]> granicus.if.org Git - php/commitdiff
Change soap's ctors to __construct(),
authorDmitry Stogov <dmitry@php.net>
Mon, 13 Sep 2004 11:55:24 +0000 (11:55 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 13 Sep 2004 11:55:24 +0000 (11:55 +0000)
rename SoapClient->__call() to SoapClinet->__soapCall().

ext/soap/interop/client_round2_interop.php
ext/soap/soap.c
ext/soap/tests/bugs/bug28969.phpt
ext/soap/tests/bugs/bug29795.phpt
ext/soap/tests/bugs/bug29839.phpt
ext/soap/tests/bugs/bug29844.phpt
ext/soap/tests/transport001.phpt

index d8246a45d1980c8f2e68c807bdc494e0daa21a81..588ee928889186b6357bd9d8466a79b6b9f8f0dd 100644 (file)
@@ -94,7 +94,7 @@ class Interop_Client
         $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";
@@ -428,9 +428,9 @@ try {
             $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) {
index 521c103ecd471f864554cc6fc0ea5a6e7d62b943..af8be97f93c992e45bcdd568b709a240924d9c6b 100644 (file)
@@ -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)
@@ -262,7 +268,7 @@ 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
@@ -270,7 +276,7 @@ static zend_function_entry soap_fault_functions[] = {
 };
 
 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)
@@ -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)
@@ -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}
 };
 
index af2fb10290bda00821ebb7fe920315ee9249fa6b..6634888eac1807f0d8ec231be214548739e11639 100644 (file)
@@ -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');
   }
index f32d16a996ebab65d58aa0ba87f0d150fcd46ef7..52f8862fda123eb5fdd28e354ab281f0b261f6ea 100644 (file)
@@ -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) {
index ab05820f0a5728ddf534e7ad965020109ea87d8d..25b4512a72c22c075da72711f797c0e3021a3f9a 100644 (file)
@@ -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');
   }
index baf7cde6d3b8e2fdea85f119d4bd50a1fb1e2127..bef8335709f45e7ac2d610148abaec4cf88d04d5 100644 (file)
@@ -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');;
   }
index ae4de925240721973b3aca129783aaa1eccb02dc..9134d3d7fb89bfba93c94a27f750ca270161b13e 100644 (file)
@@ -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');
   }