Re: [PHP-SOAP-DEV] Re: php-soap mailing lists
Status: Alpha
Brought to you by:
rodif_bl
From: brad l. <rod...@ya...> - 2002-05-02 18:43:30
|
--- andrey <ahr...@ic...> wrote: > Hi Brad, > > > $soap->setClass("some_class"); > > > > class some_class > > { > > function method_one(); > > function method_two(); > > } > > > > now the soap server will act just like that class will. > But what if the class has some methods I don't want to expose one or more > methods? However I think that adding method of a class is done transparently > so > $server->addfunction(array("some_class","method_one")); > This kind of adding works in the gtk extension as well as in the xmlrpc > extension. Well when you do $soap->setClass("class"); I look at it like that soap service IS that class. Why i did that is... You can build a class and expose it thur soap.. and have any client use your soap object as is.. no changing your object.. just like they would use it locally. I really want to keep this functionality. Its very very useful. Cause you can create an instance of the object and persist it. I can make the extension not expose private functions like _*() functions. take a look at that sample.. http://phpsoaptoolkit.sourceforge.net/phpsoap/guide/samples/session_object/ Now if you are talking about a non-class based soap-server and you just want to expose some methods to an existing class the class method will have to be static. Meaning the method can't access any $this-> members or functions. The extension doesn't currently handle this. here is an example. <? $server->addFunction(array("foo" => "bar", "foo" => "foo")); // when someone trys to call foo->foo (thru soap) it will fail.. cause // there isn't an instance of foo. class foo { var $foo = 'foo'; function bar($bar) { return "bar says $bar"; } function foo() { return "foo can't say $this->foo"; } } ?> > > yeah it can't be compiled as a dso.. it can be compiled in staically.. > > just your normal configure. > > > > ./configure --enable-soap --(other php config > options) --with-apache=(apache > > location) > Ok. I'll try to build it tonight. tell me how it goes > > Andrey > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Phpsoaptoolkit-development mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpsoaptoolkit-development __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com |