#27838 [Opn->Fbk]: SoapServer->setClass does not trigger __construct(), but only ClassName()
| From: | sniper@php.net | Date: | Wed, 07 Apr 2004 08:36:46 +0000 |
| Subject: | #27838 [Opn->Fbk]: SoapServer->setClass does not trigger __construct(), but only ClassName() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57622@lists.php.net to get a copy of this message | ||
ID: 27838
Updated by: sniper@php.net
Reported By: ron at xit dot nl
-Status: Open
+Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: Debian
PHP Version: 5.0.0RC1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-04-02 09:11:48] ron at xit dot nl
Description:
------------
Hi,
When I use the SetClass method in my SoapServer object, it only
triggers a constructor with the name of the class: ClassName() and not
__construct. It happens when I don't even have a constructor called
ClassName(), so it's not a problem of the order in which the Zend
Engine looks for constructors. It simply always ignores __construct().
Reproduce code:
---------------
class SoapHandler
{
function __construct($param)
{
die($param);
}
}
$soap = new SoapServer(NULL, array("uri" => "urn:myurn"));
$soap->setClass("SoapHandler", "myparam");
Expected result:
----------------
output:
myparam
Actual result:
--------------
no output
rename the __construct to SoapHandler() and it will work as expected
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27838&edit=1