Просмотр исходного кода

Zend_Soap: [ZF-9780] (setters become fluent interfaces) plus some additional dockblocks fixes.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22860 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander 15 лет назад
Родитель
Сommit
a23565d210
1 измененных файлов с 17 добавлено и 5 удалено
  1. 17 5
      library/Zend/Soap/AutoDiscover.php

+ 17 - 5
library/Zend/Soap/AutoDiscover.php

@@ -123,20 +123,20 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * Set the location at which the WSDL file will be availabe.
      *
      * @see Zend_Soap_Exception
-     * @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);
         }
 
@@ -167,13 +167,13 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      *
      * @see Zend_Soap_Exception
      * @see Zend_Soap_Exception
-     * @throws Zend_Soap_AutoDiscover_Exception
      * @param  string $wsdlClass
      * @return Zend_Soap_AutoDiscover
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function setWsdlClass($wsdlClass)
     {
-        if(!is_string($wsdlClass) && !is_subclass_of($wsdlClass, 'Zend_Soap_Wsdl')) {
+        if (!is_string($wsdlClass) && !is_subclass_of($wsdlClass, 'Zend_Soap_Wsdl')) {
             require_once "Zend/Soap/AutoDiscover/Exception.php";
             throw new Zend_Soap_AutoDiscover_Exception("No Zend_Soap_Wsdl subclass given to Zend_Soap_AutoDiscover::setWsdlClass as string.");
         }
@@ -201,6 +201,7 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * @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 +306,7 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * @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 +326,8 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
             $this->_addFunctionToWsdl($method, $wsdl, $port, $binding);
         }
         $this->_wsdl = $wsdl;
+
+        return this;
     }
 
     /**
@@ -484,6 +488,7 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      *
      * @param string $fault
      * @param string|int $code
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function fault($fault = null, $code = null)
     {
@@ -508,6 +513,8 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * Proxy to WSDL dump function
      *
      * @param string $filename
+     * @return boolean
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function dump($filename)
     {
@@ -524,6 +531,9 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
 
     /**
      * Proxy to WSDL toXml() function
+     *
+     * @return string
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function toXml()
     {
@@ -552,6 +562,7 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * Load Functions
      *
      * @param unknown_type $definition
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function loadFunctions($definition)
     {
@@ -563,6 +574,7 @@ class Zend_Soap_AutoDiscover implements Zend_Server_Interface
      * Set Persistance
      *
      * @param int $mode
+     * @throws Zend_Soap_AutoDiscover_Exception
      */
     public function setPersistence($mode)
     {