Index: library/Zend/Soap/AutoDiscover.php =================================================================== --- library/Zend/Soap/AutoDiscover.php (revision 22797) +++ library/Zend/Soap/AutoDiscover.php (working copy) @@ -110,11 +110,11 @@ $this->_reflection = new Zend_Server_Reflection(); $this->setComplexTypeStrategy($strategy); - if($uri !== null) { + if ($uri !== null) { $this->setUri($uri); } - if($wsdlClass !== null) { + if ($wsdlClass !== null) { $this->setWsdlClass($wsdlClass); } } @@ -126,17 +126,18 @@ * @throws Zend_Soap_AutoDiscover_Exception * @param Zend_Uri|string $uri * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception */ public function setUri($uri) { - if(!is_string($uri) && !($uri instanceof Zend_Uri)) { + if (!is_string($uri) && !($uri instanceof Zend_Uri)) { require_once "Zend/Soap/AutoDiscover/Exception.php"; throw new Zend_Soap_AutoDiscover_Exception("No uri given to Zend_Soap_AutoDiscover::setUri as string or Zend_Uri instance."); } $this->_uri = $uri; // change uri in WSDL file also if existant - if($this->_wsdl instanceof Zend_Soap_Wsdl) { + if ($this->_wsdl instanceof Zend_Soap_Wsdl) { $this->_wsdl->setUri($uri); } @@ -170,6 +171,7 @@ * @throws Zend_Soap_AutoDiscover_Exception * @param string $wsdlClass * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception */ public function setWsdlClass($wsdlClass) { @@ -201,6 +203,7 @@ * @see Zend_Soap_AutoDiscover_Exception * @param array $operationStyle * @return Zend_Soap_AutoDiscover + * @throws Zend_Soap_AutoDiscover_Exception */ public function setOperationBodyStyle(array $operationStyle=array()) { @@ -305,6 +308,7 @@ * @param string $class Class Name * @param string $namespace Class Namspace - Not Used * @param array $argv Arguments to instantiate the class - Not Used + * @return Zend_Soap_AutoDiscover */ public function setClass($class, $namespace = '', $argv = null) { @@ -324,6 +328,8 @@ $this->_addFunctionToWsdl($method, $wsdl, $port, $binding); } $this->_wsdl = $wsdl; + + return $this; } /** @@ -331,6 +337,7 @@ * * @param string $function Function Name * @param string $namespace Function namespace - Not Used + * @return Zend_Soap_AutoDiscover */ public function addFunction($function, $namespace = '') { @@ -366,6 +373,8 @@ $this->_addFunctionToWsdl($method, $wsdl, $port, $binding); } $this->_wsdl = $wsdl; + + return $this; } /** @@ -375,7 +384,7 @@ * @param $wsdl Zend_Soap_Wsdl WSDL document * @param $port object wsdl:portType * @param $binding object wsdl:binding - * @return void + * @return Zend_Soap_AutoDiscover */ protected function _addFunctionToWsdl($function, $wsdl, $port, $binding) { @@ -477,6 +486,8 @@ // Add the function name to the list $this->_functions[] = $function->getName(); + + return $this; } /** @@ -484,6 +495,7 @@ * * @param string $fault * @param string|int $code + * @throws Zend_Soap_AutoDiscover_Exception */ public function fault($fault = null, $code = null) { @@ -495,6 +507,7 @@ * Handle the Request * * @param string $request A non-standard request - Not Used + * @return Zend_Soap_AutoDiscover */ public function handle($request = false) { @@ -502,12 +515,16 @@ header('Content-Type: text/xml'); } $this->_wsdl->dump(); + + return $this; } /** * Proxy to WSDL dump function * * @param string $filename + * @return boolean + * @throws Zend_Soap_AutoDiscover_Exception */ public function dump($filename) { @@ -524,6 +541,9 @@ /** * Proxy to WSDL toXml() function + * + * @return string + * @throws Zend_Soap_AutoDiscover_Exception */ public function toXml() { @@ -552,6 +572,7 @@ * Load Functions * * @param unknown_type $definition + * @throws Zend_Soap_AutoDiscover_Exception */ public function loadFunctions($definition) { @@ -563,6 +584,7 @@ * Set Persistance * * @param int $mode + * @throws Zend_Soap_AutoDiscover_Exception */ public function setPersistence($mode) {