[wsf-c-dev] [wsf-php] API for adding classes to WSService
nandika
nandika at wso2.com
Mon Nov 12 00:56:54 PST 2007
Hi all,
At the moment we only support exposing php functions as operations in
server side. However a user may need to expose php class methods
as operations as well.
I think we can do this in 2 ways.
1 . adding an additional option to WSService as "classes" which would be
an array of arrays as follows.
WSService( array("classes"=>array(array("foo",$operations, $actions))));
Here, "foo" is the class name. $operations, and $actions are optional
arrays. $operations is an
array of operations to functions mapping similar to what we already have
for functions.
If $operations is not specified , all public functions of class 'foo'
will be exposed as operations with the function name as operation name.
$actions will be an array of operations to actions mapping.
2. adding a setClass method to the API.
setClass(String classname, array of operations, array of actions);
What would be the better way ?
-- Nandika
More information about the Wsf-c-dev
mailing list