Skip to content

Commit

Permalink
Change soap's ctors to __construct(),
Browse files Browse the repository at this point in the history
rename SoapClient->__call() to SoapClinet->__soapCall().
  • Loading branch information
dstogov committed Sep 13, 2004
1 parent f5722d6 commit bb3e125
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion NEWS
Expand Up @@ -9,7 +9,7 @@ PHP NEWS
(Paul Hudson, Derick)
- Implemented periodic PCRE compiled regexp cache cleanup, to avoid memory
exhaustion. (Andrei)
- Renamed SoapClient->__call() to SoapClinet->__soap_call(). (Dmitry)
- Renamed SoapClient->__call() to SoapClinet->__soapCall(). (Dmitry)
- Fixed bug with raw_post_data not getting set (Brian)
- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
- Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report
Expand Down
6 changes: 3 additions & 3 deletions ext/soap/interop/client_round2_interop.php
Expand Up @@ -94,7 +94,7 @@ function _fetchEndpoints(&$soapclient, $test) {
$this->_getEndpoints($test, 1);

// retreive endpoints from the endpoint server
$endpointArray = $soapclient->__soap_call("GetEndpointInfo",array("groupName"=>$test),array('soapaction'=>"http://soapinterop.org/",'uri'=>"http://soapinterop.org/"));
$endpointArray = $soapclient->__soapCall("GetEndpointInfo",array("groupName"=>$test),array('soapaction'=>"http://soapinterop.org/",'uri'=>"http://soapinterop.org/"));
if (is_soap_fault($endpointArray) || PEAR::isError($endpointArray)) {
if ($this->html) print "<pre>";
print $soapclient->wire."\n";
Expand Down Expand Up @@ -428,9 +428,9 @@ function doEndpointMethod(&$endpoint_info, &$soap_test) {
$return = eval('return $soap->'.$soap_test->method_name.'('.$args.');');
} else {
if ($soap_test->headers || $soap_test->headers_expect) {
$return = $soap->__soap_call($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace), $soap_test->headers, $result_headers);
$return = $soap->__soapCall($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace), $soap_test->headers, $result_headers);
} else {
$return = $soap->__soap_call($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace));
$return = $soap->__soapCall($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace));
}
}
} catch (SoapFault $ex) {
Expand Down
22 changes: 14 additions & 8 deletions ext/soap/soap.c
Expand Up @@ -251,6 +251,12 @@ PHP_METHOD(SoapParam, SoapParam);
/* SoapHeader Functions */
PHP_METHOD(SoapHeader, SoapHeader);

#ifdef ZEND_ENGINE_2
#define SOAP_CTOR(class_name, func_name, arginfo, flags) ZEND_FENTRY(__construct, ZEND_FN(class_name##_##func_name), arginfo, flags)
#else
#define SOAP_CTOR(class_name, func_name, arginfo, flags) PHP_ME(class_name, func_name, arginfo, flags)
#endif

static zend_function_entry soap_functions[] = {
#ifdef HAVE_PHP_DOMXML
PHP_FE(soap_encode_to_xml, NULL)
Expand All @@ -262,15 +268,15 @@ static zend_function_entry soap_functions[] = {
};

static zend_function_entry soap_fault_functions[] = {
PHP_ME(SoapFault, SoapFault, NULL, 0)
SOAP_CTOR(SoapFault, SoapFault, NULL, 0)
#ifdef ZEND_ENGINE_2
PHP_ME(SoapFault, __toString, NULL, 0)
#endif
{NULL, NULL, NULL}
};

static zend_function_entry soap_server_functions[] = {
PHP_ME(SoapServer, SoapServer, NULL, 0)
SOAP_CTOR(SoapServer, SoapServer, NULL, 0)
PHP_ME(SoapServer, setPersistence, NULL, 0)
PHP_ME(SoapServer, setClass, NULL, 0)
PHP_ME(SoapServer, addFunction, NULL, 0)
Expand Down Expand Up @@ -301,12 +307,12 @@ unsigned char __soap_call_args[] = { 5, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYRE
#endif

static zend_function_entry soap_client_functions[] = {
PHP_ME(SoapClient, SoapClient, NULL, 0)
SOAP_CTOR(SoapClient, SoapClient, NULL, 0)
PHP_ME(SoapClient, __call, __call_args, 0)
#ifdef ZEND_ENGINE_2
ZEND_FENTRY(__soap_call, ZEND_FN(SoapClient___call), __soap_call_args, 0)
ZEND_FENTRY(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args, 0)
#else
ZEND_NAMED_FE(__soap_call, ZEND_FN(SoapClient___call), __soap_call_args)
ZEND_NAMED_FE(__soapCall, ZEND_FN(SoapClient___call), __soap_call_args)
#endif
PHP_ME(SoapClient, __getLastRequest, NULL, 0)
PHP_ME(SoapClient, __getLastResponse, NULL, 0)
Expand All @@ -319,17 +325,17 @@ static zend_function_entry soap_client_functions[] = {
};

static zend_function_entry soap_var_functions[] = {
PHP_ME(SoapVar, SoapVar, NULL, 0)
SOAP_CTOR(SoapVar, SoapVar, NULL, 0)
{NULL, NULL, NULL}
};

static zend_function_entry soap_param_functions[] = {
PHP_ME(SoapParam, SoapParam, NULL, 0)
SOAP_CTOR(SoapParam, SoapParam, NULL, 0)
{NULL, NULL, NULL}
};

static zend_function_entry soap_header_functions[] = {
PHP_ME(SoapHeader, SoapHeader, NULL, 0)
SOAP_CTOR(SoapHeader, SoapHeader, NULL, 0)
{NULL, NULL, NULL}
};

Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug28969.phpt
Expand Up @@ -11,8 +11,8 @@ function test() {

class LocalSoapClient extends SoapClient {

function LocalSoapClient($wsdl, $options) {
$this->SoapClient($wsdl, $options);
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
$this->server->addFunction('test');
}
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug29795.phpt
Expand Up @@ -6,8 +6,8 @@ Bug #29795 (SegFault with Soap and Amazon's Web Services)
<?php
class LocalSoapClient extends SoapClient {

function LocalSoapClient($wsdl, $options) {
$this->SoapClient($wsdl, $options);
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
}

function __doRequest($request, $location, $action, $version) {
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug29839.phpt
Expand Up @@ -11,8 +11,8 @@ function EchoString($s) {

class LocalSoapClient extends SoapClient {

function LocalSoapClient($wsdl, $options) {
$this->SoapClient($wsdl, $options);
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
$this->server->addFunction('EchoString');
}
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/bugs/bug29844.phpt
Expand Up @@ -13,8 +13,8 @@ class hello_world {

class LocalSoapClient extends SoapClient {

function LocalSoapClient($wsdl, $options) {
$this->SoapClient($wsdl, $options);
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
$this->server->setClass('hello_world');;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/soap/tests/transport001.phpt
Expand Up @@ -10,8 +10,8 @@ function Add($x,$y) {

class LocalSoapClient extends SoapClient {

function LocalSoapClient($wsdl, $options) {
$this->SoapClient($wsdl, $options);
function __construct($wsdl, $options) {
parent::__construct($wsdl, $options);
$this->server = new SoapServer($wsdl, $options);
$this->server->addFunction('Add');
}
Expand Down

0 comments on commit bb3e125

Please sign in to comment.