diff --git a/src/Client.php b/src/Client.php index a6aec885..a1833b29 100644 --- a/src/Client.php +++ b/src/Client.php @@ -56,18 +56,18 @@ class Client implements ServerClient protected $use = null; protected $login = null; protected $password = null; - protected $proxy_host = null; - protected $proxy_port = null; - protected $proxy_login = null; - protected $proxy_password = null; - protected $local_cert = null; + protected $proxyHost = null; + protected $proxyPort = null; + protected $proxyLogin = null; + protected $proxyPassword = null; + protected $localCert = null; protected $passphrase = null; protected $compression = null; - protected $connection_timeout = null; - protected $stream_context = null; + protected $connectionTimeout = null; + protected $streamContext = null; protected $features = null; - protected $cache_wsdl = null; - protected $user_agent = null; + protected $cacheWsdl = null; + protected $userAgent = null; /** * WSDL used to access server @@ -250,7 +250,7 @@ public function setOptions($options) // Not used now // case 'connection_timeout': - // $this->connection_timeout = $value; + // $this->connectionTimeout = $value; // break; default: @@ -288,7 +288,7 @@ public function getOptions() $options['local_cert'] = $this->getHttpsCertificate(); $options['passphrase'] = $this->getHttpsCertPassphrase(); $options['compression'] = $this->getCompressionOptions(); - //$options['connection_timeout'] = $this->connection_timeout; + //$options['connection_timeout'] = $this->connectionTimeout; $options['stream_context'] = $this->getStreamContext(); $options['cache_wsdl'] = $this->getWSDLCache(); $options['features'] = $this->getSoapFeatures(); @@ -597,7 +597,7 @@ public function getHttpPassword() */ public function setProxyHost($proxyHost) { - $this->proxy_host = $proxyHost; + $this->proxyHost = $proxyHost; $this->soapClient = null; @@ -611,7 +611,7 @@ public function setProxyHost($proxyHost) */ public function getProxyHost() { - return $this->proxy_host; + return $this->proxyHost; } /** @@ -622,7 +622,7 @@ public function getProxyHost() */ public function setProxyPort($proxyPort) { - $this->proxy_port = (int) $proxyPort; + $this->proxyPort = (int) $proxyPort; $this->soapClient = null; @@ -636,7 +636,7 @@ public function setProxyPort($proxyPort) */ public function getProxyPort() { - return $this->proxy_port; + return $this->proxyPort; } /** @@ -647,7 +647,7 @@ public function getProxyPort() */ public function setProxyLogin($proxyLogin) { - $this->proxy_login = $proxyLogin; + $this->proxyLogin = $proxyLogin; $this->soapClient = null; @@ -661,7 +661,7 @@ public function setProxyLogin($proxyLogin) */ public function getProxyLogin() { - return $this->proxy_login; + return $this->proxyLogin; } /** @@ -672,7 +672,7 @@ public function getProxyLogin() */ public function setProxyPassword($proxyPassword) { - $this->proxy_password = $proxyPassword; + $this->proxyPassword = $proxyPassword; $this->soapClient = null; @@ -692,7 +692,7 @@ public function setHttpsCertificate($localCert) throw new Exception\InvalidArgumentException('Invalid HTTPS client certificate path.'); } - $this->local_cert = $localCert; + $this->localCert = $localCert; $this->soapClient = null; @@ -706,7 +706,7 @@ public function setHttpsCertificate($localCert) */ public function getHttpsCertificate() { - return $this->local_cert; + return $this->localCert; } /** @@ -769,7 +769,7 @@ public function getCompressionOptions() */ public function getProxyPassword() { - return $this->proxy_password; + return $this->proxyPassword; } /** @@ -784,7 +784,7 @@ public function setStreamContext($context) throw new Exception\InvalidArgumentException('Invalid stream context resource given.'); } - $this->stream_context = $context; + $this->streamContext = $context; return $this; } @@ -795,7 +795,7 @@ public function setStreamContext($context) */ public function getStreamContext() { - return $this->stream_context; + return $this->streamContext; } /** @@ -831,9 +831,9 @@ public function getSoapFeatures() public function setWSDLCache($caching) { if ($caching === null) { - $this->cache_wsdl = null; + $this->cacheWsdl = null; } else { - $this->cache_wsdl = (int) $caching; + $this->cacheWsdl = (int) $caching; } return $this; } @@ -845,7 +845,7 @@ public function setWSDLCache($caching) */ public function getWSDLCache() { - return $this->cache_wsdl; + return $this->cacheWsdl; } /** @@ -857,9 +857,9 @@ public function getWSDLCache() public function setUserAgent($userAgent) { if ($userAgent === null) { - $this->user_agent = null; + $this->userAgent = null; } else { - $this->user_agent = (string) $userAgent; + $this->userAgent = (string) $userAgent; } return $this; } @@ -871,7 +871,7 @@ public function setUserAgent($userAgent) */ public function getUserAgent() { - return $this->user_agent; + return $this->userAgent; } /** @@ -951,16 +951,16 @@ public function getLastMethod() * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function _doRequest(Client\Common $client, $request, $location, $action, $version, $one_way = null) + public function _doRequest(Client\Common $client, $request, $location, $action, $version, $oneWay = null) { // Perform request as is - if ($one_way === null) { + if ($oneWay === null) { return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version); } - return call_user_func(array($client, 'SoapClient::__doRequest'), $request, $location, $action, $version, $one_way); + return call_user_func(array($client, 'SoapClient::__doRequest'), $request, $location, $action, $version, $oneWay); } /** diff --git a/src/Client/Common.php b/src/Client/Common.php index a95019cc..6128a03b 100644 --- a/src/Client/Common.php +++ b/src/Client/Common.php @@ -48,16 +48,16 @@ public function __construct($doRequestCallback, $wsdl, $options) * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function __doRequest($request, $location, $action, $version, $one_way = null) + public function __doRequest($request, $location, $action, $version, $oneWay = null) { - if ($one_way === null) { + if ($oneWay === null) { return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version); } - return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version, $one_way); + return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version, $oneWay); } } diff --git a/src/Client/Local.php b/src/Client/Local.php index 0560b5ac..c2c8dbb8 100644 --- a/src/Client/Local.php +++ b/src/Client/Local.php @@ -60,10 +60,10 @@ public function __construct(SOAPServer $server, $wsdl, $options = null) * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function _doRequest(Common $client, $request, $location, $action, $version, $one_way = null) + public function _doRequest(Common $client, $request, $location, $action, $version, $oneWay = null) { // Perform request as is ob_start(); diff --git a/src/Wsdl.php b/src/Wsdl.php index bcb90749..ca250f3a 100644 --- a/src/Wsdl.php +++ b/src/Wsdl.php @@ -297,21 +297,21 @@ public function addBindingOperation($binding, $name, $input = false, $output = f if (is_array($input)) { $node = $this->dom->createElement('input'); - $soap_node = $this->dom->createElement('soap:body'); + $soapNode = $this->dom->createElement('soap:body'); foreach ($input as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $value); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } if (is_array($output)) { $node = $this->dom->createElement('output'); - $soap_node = $this->dom->createElement('soap:body'); + $soapNode = $this->dom->createElement('soap:body'); foreach ($output as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $value); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } @@ -320,11 +320,11 @@ public function addBindingOperation($binding, $name, $input = false, $output = f if (isset($fault['name'])) { $node->setAttribute('name', $fault['name']); } - $soap_node = $this->dom->createElement('soap:fault'); + $soapNode = $this->dom->createElement('soap:fault'); foreach ($fault as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $value); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } @@ -343,45 +343,45 @@ public function addBindingOperation($binding, $name, $input = false, $output = f */ public function addSoapBinding($binding, $style = 'document', $transport = 'http://schemas.xmlsoap.org/soap/http') { - $soap_binding = $this->dom->createElement('soap:binding'); - $soap_binding->setAttribute('style', $style); - $soap_binding->setAttribute('transport', $transport); + $soapBinding = $this->dom->createElement('soap:binding'); + $soapBinding->setAttribute('style', $style); + $soapBinding->setAttribute('transport', $transport); - $binding->appendChild($soap_binding); + $binding->appendChild($soapBinding); - return $soap_binding; + return $soapBinding; } /** * Add a {@link http://www.w3.org/TR/wsdl#_soap:operation SOAP operation} to an operation element * * @param object $operation An operation XML_Tree_Node returned by {@link function addBindingOperation} - * @param string $soap_action SOAP Action + * @param string $soapAction SOAP Action * @return bool */ - public function addSoapOperation($binding, $soap_action) + public function addSoapOperation($binding, $soapAction) { - if ($soap_action instanceof Uri) { - $soap_action = $soap_action->toString(); + if ($soapAction instanceof Uri) { + $soapAction = $soapAction->toString(); } - $soap_operation = $this->dom->createElement('soap:operation'); - $soap_operation->setAttribute('soapAction', $soap_action); + $soapOperation = $this->dom->createElement('soap:operation'); + $soapOperation->setAttribute('soapAction', $soapAction); - $binding->insertBefore($soap_operation, $binding->firstChild); + $binding->insertBefore($soapOperation, $binding->firstChild); - return $soap_operation; + return $soapOperation; } /** * Add a {@link http://www.w3.org/TR/wsdl#_services service} element to the WSDL * * @param string $name Service Name - * @param string $port_name Name of the port for the service + * @param string $portName Name of the port for the service * @param string $binding Binding for the port * @param string $location SOAP Address for the service * @return object The new service's XML_Tree_Node for use with {@link function addDocumentation} */ - public function addService($name, $port_name, $binding, $location) + public function addService($name, $portName, $binding, $location) { if ($location instanceof Uri) { $location = $location->toString(); @@ -390,13 +390,13 @@ public function addService($name, $port_name, $binding, $location) $service->setAttribute('name', $name); $port = $this->dom->createElement('port'); - $port->setAttribute('name', $port_name); + $port->setAttribute('name', $portName); $port->setAttribute('binding', $binding); - $soap_address = $this->dom->createElement('soap:address'); - $soap_address->setAttribute('location', $location); + $soapAddress = $this->dom->createElement('soap:address'); + $soapAddress->setAttribute('location', $location); - $port->appendChild($soap_address); + $port->appendChild($soapAddress); $service->appendChild($port); $this->wsdl->appendChild($service); @@ -411,21 +411,21 @@ public function addService($name, $port_name, $binding, $location) * but the WSDL {@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation' instead. * The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'. * - * @param object $input_node An XML_Tree_Node returned by another method to add the documentation to + * @param object $inputNode An XML_Tree_Node returned by another method to add the documentation to * @param string $documentation Human readable documentation for the node * @return DOMElement The documentation element */ - public function addDocumentation($input_node, $documentation) + public function addDocumentation($inputNode, $documentation) { - if ($input_node === $this) { + if ($inputNode === $this) { $node = $this->dom->documentElement; } else { - $node = $input_node; + $node = $inputNode; } $doc = $this->dom->createElement('documentation'); - $doc_cdata = $this->dom->createTextNode(str_replace(array("\r\n", "\r"), "\n", $documentation)); - $doc->appendChild($doc_cdata); + $docCData = $this->dom->createTextNode(str_replace(array("\r\n", "\r"), "\n", $documentation)); + $doc->appendChild($docCData); if ($node->hasChildNodes()) { $node->insertBefore($doc, $node->firstChild);