#31817 [Bgs->Opn]: magic method __call is being ignored in classes "exported" with setClass()

From: Date: Fri, 04 Feb 2005 14:42:43 +0000
Subject: #31817 [Bgs->Opn]: magic method __call is being ignored in classes "exported" with setClass()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-73468@lists.php.net to get a copy of this message
ID: 31817 User updated by: tschlottke at virtualminds dot de Reported By: tschlottke at virtualminds dot de -Status: Bogus +Status: Open Bug Type: SOAP related Operating System: debian unstable PHP Version: 5.0.3 Assigned To: dmitry New Comment: Yes, that's not what I ment. Sure, __call is being called if I call another method from within test() but __call should also be called if a not existing method is being called via soap, IMHO, you know what I mean? This is very useful if you want to wrap all soap calls and check the parameters, for example, so you can create completly virtual soap methods. In my case I use this to check if the session is valid. The user always has to send the session-id as the first parameter for each function and __call checks if everything is correct and calls all the target-method via call_user_function_array() or something. Previous Comments: ------------------------------------------------------------------------ [2005-02-04 15:29:27] dmitry@php.net It works as expected. If you will call somthing different from "test" you will go into __call(). ------------------------------------------------------------------------ [2005-02-02 16:40:44] tschlottke at virtualminds dot de Description: ------------ PHP 5's magic __call() method is being ignored in classes exported via soap. It's being ignored completly, afais. IMHO it should be called. Reproduce code: --------------- <?php class test { function __call($func,$args) { return 'this is __call()'; } function test(){ return 'this is test()'; } } $server = new SoapServer(null, array('uri' => "namespace")); $server->setClass('test'); $server->handle(); ?> --- <?php $client=new SoapClient(...); echo $client->test(); ?> Expected result: ---------------- "this is __call" Actual result: -------------- "this is test()" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31817&edit=1

« previous php.bugs (#73468) next »