Is there anyway to create a class method, I want to return an object which
has a number of 'runtime' methods.

What I want to do is parse a WSDL and generate an interface object ( with
the correct functions ), the way I see it I cant do this as we lack a
create_method call.  I can parse the WSDL and build a class, but I then have
to require the class.  I dont want to do that though as its more of a static
language way of doing things.

The closest Ive come is this....
class base_obj
{
};

$o = new base_obj;
$o->method_1 = create_function( '$str', 'echo( $str );' );

unfortunatly you cant call
$o->method_1( "hello world" );

you have to do
$tmp = $o->method_1;
$tmp( "hello world" );

Am I missing something or is it imposible to do what I want.

Rich





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to