diff --git a/src/AutoDiscover.php b/src/AutoDiscover.php index d7b7cb65..37f5d3b4 100644 --- a/src/AutoDiscover.php +++ b/src/AutoDiscover.php @@ -19,19 +19,17 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap; use Zend\Uri, Zend\Soap\Wsdl, - Zend\Soap\Wsdl\ComplexTypeStrategy, + Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTypeStrategy, Zend\Server\Reflection\AbstractFunction, Zend\Server\Reflection, Zend\Server\Reflection\Prototype, Zend\Server\Reflection\ReflectionParameter, - Zend\Soap\AutoDiscover\DiscoveryStrategy\ReflectionDiscovery; + Zend\Soap\AutoDiscover\DiscoveryStrategy\ReflectionDiscovery, + Zend\Soap\AutoDiscover\DiscoveryStrategy\DiscoveryStrategyInterface as DiscoveryStrategy; /** * \Zend\Soap\AutoDiscover @@ -109,14 +107,14 @@ class AutoDiscover /** * Discovery strategy for types and other method details. * - * @var Zend\Soap\AutoDiscover\DiscoveryStrategy + * @var DiscoveryStrategy */ protected $_discoveryStrategy; /** * Constructor * - * @param \Zend\Soap\Wsdl\ComplexTypeStrategy $strategy + * @param ComplexTypeStrategy $strategy * @param string|Uri\Uri $endpointUri * @param string $wsdlClass */ @@ -141,8 +139,8 @@ public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri=n /** * Set the discovery strategy for method type and other information. * - * @param AutoDiscover\DiscoveryStrategy $discoveryStrategy - * @return Zend\Soap\AutoDiscover + * @param DiscoveryStrategy $discoveryStrategy + * @return AutoDiscover */ public function setDiscoveryStrategy(DiscoveryStrategy $discoveryStrategy) { @@ -151,7 +149,7 @@ public function setDiscoveryStrategy(DiscoveryStrategy $discoveryStrategy) } /** - * @return AutoDiscover\DiscoveryStrategy + * @return DiscoveryStrategy */ public function getDiscoveryStrategy() { @@ -193,6 +191,7 @@ public function setServiceName($serviceName) * Get service name * * @return string + * @throws Exception\RuntimeException */ public function getServiceName() { @@ -215,8 +214,8 @@ public function getServiceName() * Set the location at which the WSDL file will be availabe. * * @param Uri\Uri|string $uri - * @return \Zend\Soap\AutoDiscover - * @throws \Zend\Soap\Exception\InvalidArgumentException + * @return AutoDiscover + * @throws Exception\InvalidArgumentException */ public function setUri($uri) { @@ -234,6 +233,7 @@ public function setUri($uri) * Return the current Uri that the SOAP WSDL Service will be located at. * * @return Uri\Uri + * @throws Exception\RuntimeException */ public function getUri() { @@ -251,8 +251,8 @@ public function getUri() * Set the name of the WSDL handling class. * * @param string $wsdlClass - * @return \Zend\Soap\AutoDiscover - * @throws \Zend\Soap\Exception\InvalidArgumentException + * @return AutoDiscover + * @throws Exception\InvalidArgumentException */ public function setWsdlClass($wsdlClass) { @@ -283,8 +283,8 @@ public function getWsdlClass() * 'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/". * * @param array $operationStyle - * @return \Zend\Soap\AutoDiscover - * @throws \Zend\Soap\Exception\InvalidArgumentException + * @return AutoDiscover + * @throws Exception\InvalidArgumentException */ public function setOperationBodyStyle(array $operationStyle=array()) { @@ -301,7 +301,7 @@ public function setOperationBodyStyle(array $operationStyle=array()) * By default 'style' is 'rpc' and 'transport' is 'http://schemas.xmlsoap.org/soap/http'. * * @param array $bindingStyle - * @return \Zend\Soap\AutoDiscover + * @return AutoDiscover */ public function setBindingStyle(array $bindingStyle=array()) { @@ -317,8 +317,8 @@ public function setBindingStyle(array $bindingStyle=array()) /** * Set the strategy that handles functions and classes that are added AFTER this call. * - * @param \Zend\Soap\Wsdl\ComplexTypeStrategy $strategy - * @return \Zend\Soap\AutoDiscover + * @param ComplexTypeStrategy $strategy + * @return AutoDiscover */ public function setComplexTypeStrategy(ComplexTypeStrategy $strategy) { @@ -331,7 +331,7 @@ public function setComplexTypeStrategy(ComplexTypeStrategy $strategy) * Set the Class the SOAP server will use * * @param string $class Class Name - * @return \Zend\Soap\AutoDiscover + * @return AutoDiscover */ public function setClass($class) { @@ -343,7 +343,7 @@ public function setClass($class) * Add a Single or Multiple Functions to the WSDL * * @param string $function Function Name - * @return \Zend\Soap\AutoDiscover + * @return AutoDiscover */ public function addFunction($function) { diff --git a/src/AutoDiscover/DiscoveryStrategy.php b/src/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php similarity index 96% rename from src/AutoDiscover/DiscoveryStrategy.php rename to src/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php index f9d2dd99..96046e28 100644 --- a/src/AutoDiscover/DiscoveryStrategy.php +++ b/src/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php @@ -19,10 +19,7 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ -namespace Zend\Soap\AutoDiscover; +namespace Zend\Soap\AutoDiscover\DiscoveryStrategy; use Zend\Server\Reflection\AbstractFunction, Zend\Server\Reflection\Prototype, @@ -37,7 +34,7 @@ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -interface DiscoveryStrategy +interface DiscoveryStrategyInterface { /** * Get the function parameters php type. diff --git a/src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php b/src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php index 7431d185..3862522d 100644 --- a/src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php +++ b/src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php @@ -19,13 +19,9 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\AutoDiscover\DiscoveryStrategy; -use Zend\Soap\AutoDiscover\DiscoveryStrategy, - Zend\Server\Reflection\AbstractFunction, +use Zend\Server\Reflection\AbstractFunction, Zend\Server\Reflection\Prototype, Zend\Server\Reflection\ReflectionParameter; @@ -39,7 +35,7 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -class ReflectionDiscovery implements DiscoveryStrategy +class ReflectionDiscovery implements DiscoveryStrategyInterface { public function getFunctionDocumentation(AbstractFunction $function) { diff --git a/src/Client.php b/src/Client.php index b0de2cd2..4335d5d6 100644 --- a/src/Client.php +++ b/src/Client.php @@ -21,6 +21,8 @@ namespace Zend\Soap; +use Traversable; +use Zend\Stdlib\ArrayUtils; use Zend\Server\Client as ServerClient; /** @@ -130,9 +132,9 @@ class Client implements ServerClient /** * Constructor * - * @param string $wsdl - * @param array $options - * @throws \Zend\Soap\Client\Exception + * @param string $wsdl + * @param array|Traversable $options + * @throws Exception\ExtensionNotLoadedException */ public function __construct($wsdl = null, $options = null) { @@ -177,14 +179,14 @@ public function getWSDL() * * Allows setting options as an associative array of option => value pairs. * - * @param array|\Zend\Config\Config $options + * @param array|Traversable $options * @return \Zend\Soap\Client\Client - * @throws \Zend\Soap\Client\Exception + * @throws Exception\InvalidArgumentException */ public function setOptions($options) { - if($options instanceof \Zend\Config\Config) { - $options = $options->toArray(); + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); } foreach ($options as $key => $value) { @@ -393,7 +395,7 @@ public function getClassmap() public function setEncoding($encoding) { if (!is_string($encoding)) { - throw new ClientException('Invalid encoding specified'); + throw new Exception\InvalidArgumentException('Invalid encoding specified'); } $this->_encoding = $encoding; diff --git a/src/Client/Common.php b/src/Client/Common.php index fdd4d846..c1f062e4 100644 --- a/src/Client/Common.php +++ b/src/Client/Common.php @@ -19,15 +19,11 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Client; if (extension_loaded('soap')) { /** - * @uses SoapClient * @category Zend * @package Zend_Soap * @subpackage Client diff --git a/src/Client/DotNet.php b/src/Client/DotNet.php index 5098b820..58124fde 100644 --- a/src/Client/DotNet.php +++ b/src/Client/DotNet.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Client; use Zend\Soap\Client as SOAPClient, @@ -36,8 +33,6 @@ * Please leave your notes, compatiblity issues reports or * suggestions in fw-webservices@lists.zend.com or fw-general@lists.com * - * @uses \Zend\Soap\Client - * @uses \Zend\Soap\ClientException * @category Zend * @package Zend_Soap * @subpackage Client diff --git a/src/Client/Local.php b/src/Client/Local.php index b35c39b3..36634e89 100644 --- a/src/Client/Local.php +++ b/src/Client/Local.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Client; use Zend\Soap\Client as SOAPClient, @@ -35,8 +32,6 @@ * * Could be used for development or testing purposes. * - * @uses \Zend\Soap\Client - * @uses \Zend\Soap\Server * @category Zend * @package Zend_Soap * @subpackage Client diff --git a/src/Exception/AutoDiscoverException.php b/src/Exception/AutoDiscoverException.php deleted file mode 100644 index 1173ae44..00000000 --- a/src/Exception/AutoDiscoverException.php +++ /dev/null @@ -1,34 +0,0 @@ - value pairs. * - * @param array|\Zend\Config\Config $options + * @param array|Traversable $options * @return \Zend\Soap\Server */ public function setOptions($options) { - if($options instanceof Config) { - $options = $options->toArray(); + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); } foreach ($options as $key => $value) { @@ -273,8 +270,8 @@ public function getOptions() * Set encoding * * @param string $encoding - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException with invalid encoding argument + * @return Server + * @throws Exception\InvalidArgumentException with invalid encoding argument */ public function setEncoding($encoding) { @@ -300,8 +297,8 @@ public function getEncoding() * Set SOAP version * * @param int $version One of the SOAP_1_1 or SOAP_1_2 constants - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException with invalid soap version argument + * @return Server + * @throws Exception\InvalidArgumentException with invalid soap version argument */ public function setSoapVersion($version) { @@ -328,7 +325,7 @@ public function getSoapVersion() * * @param string $urn * @return true - * @throws \Zend\Soap\ServerException on invalid URN + * @throws Exception\InvalidArgumentException on invalid URN */ public function validateUrn($urn) { @@ -346,7 +343,7 @@ public function validateUrn($urn) * Actor is the actor URI for the server. * * @param string $actor - * @return \Zend\Soap\Server + * @return Server */ public function setActor($actor) { @@ -371,8 +368,7 @@ public function getActor() * URI in SoapServer is actually the target namespace, not a URI; $uri must begin with 'urn:'. * * @param string $uri - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException with invalid uri argument + * @return Server */ public function setUri($uri) { @@ -395,8 +391,8 @@ public function getUri() * Set classmap * * @param array $classmap - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException for any invalid class in the class map + * @return Server + * @throws Exception\InvalidArgumentException for any invalid class in the class map */ public function setClassmap($classmap) { @@ -427,7 +423,7 @@ public function getClassmap() * Set wsdl * * @param string $wsdl URI or path to a WSDL - * @return \Zend\Soap\Server + * @return Server */ public function setWSDL($wsdl) { @@ -449,7 +445,7 @@ public function getWSDL() * Set the SOAP Feature options. * * @param string|int $feature - * @return \Zend\Soap\Server + * @return Server */ public function setSoapFeatures($feature) { @@ -471,7 +467,7 @@ public function getSoapFeatures() * Set the SOAP WSDL Caching Options * * @param string|int|boolean $caching - * @return \Zend\Soap\Server + * @return Server */ public function setWSDLCache($options) { @@ -493,8 +489,8 @@ public function getWSDLCache() * @param array|string $function Function name, array of function names to attach, * or SOAP_FUNCTIONS_ALL to attach all functions * @param string $namespace Ignored - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException on invalid functions + * @return Server + * @throws Exception\InvalidArgumentException on invalid functions */ public function addFunction($function, $namespace = '') { @@ -536,8 +532,8 @@ public function addFunction($function, $namespace = '') * See {@link setObject()} to set preconfigured object instances as request handlers. * * @param string|object $class Class name or object instance which executes SOAP Requests at endpoint. - * @return \Zend\Soap\Server - * @throws \Zend\Soap\ServerException if called more than once, or if class + * @return Server + * @throws Exception\InvalidArgumentException if called more than once, or if class * does not exist */ public function setClass($class, $namespace = '', $argv = null) @@ -573,7 +569,7 @@ public function setClass($class, $namespace = '', $argv = null) * Accepts an instanciated object to use when handling requests. * * @param object $object - * @return \Zend\Soap\Server + * @return Server */ public function setObject($object) { @@ -617,7 +613,7 @@ public function getFunctions() * * @param array $array * @return void - * @throws \Zend\Soap\ServerException Unimplemented + * @throws Exception\RuntimeException Unimplemented */ public function loadFunctions($definition) { @@ -628,7 +624,7 @@ public function loadFunctions($definition) * Set server persistence * * @param int $mode - * @return \Zend\Soap\Server + * @return Server */ public function setPersistence($mode) { @@ -643,7 +639,7 @@ public function setPersistence($mode) /** * Get server persistence * - * @return \Zend\Soap\Server + * @return Server */ public function getPersistence() { @@ -661,15 +657,15 @@ public function getPersistence() * - string; if so, verifies XML * * @param DOMDocument|DOMNode|SimpleXMLElement|stdClass|string $request - * @return \Zend\Soap\Server + * @return Server */ protected function _setRequest($request) { - if ($request instanceof \DOMDocument) { + if ($request instanceof DOMDocument) { $xml = $request->saveXML(); - } elseif ($request instanceof \DOMNode) { + } elseif ($request instanceof DOMNode) { $xml = $request->ownerDocument->saveXML(); - } elseif ($request instanceof \SimpleXMLElement) { + } elseif ($request instanceof SimpleXMLElement) { $xml = $request->asXML(); } elseif (is_object($request) || is_string($request)) { if (is_object($request)) { @@ -678,7 +674,7 @@ protected function _setRequest($request) $xml = $request; } - $dom = new \DOMDocument(); + $dom = new DOMDocument(); if(strlen($xml) == 0 || !$dom->loadXML($xml)) { throw new Exception\InvalidArgumentException('Invalid XML'); } @@ -706,7 +702,7 @@ public function getLastRequest() * The response is always available via {@link getResponse()}. * * @param boolean $flag - * @return \Zend\Soap\Server + * @return Server */ public function setReturnResponse($flag = true) { @@ -794,13 +790,13 @@ public function handle($request = null) $request = file_get_contents('php://input'); } - // Set \Zend\Soap\Server error handler + // Set Server error handler $displayErrorsOriginalState = $this->_initializeSoapErrorContext(); $setRequestException = null; try { $this->_setRequest($request); - } catch (Exception $e) { + } catch (\Exception $e) { $setRequestException = $e; } @@ -849,7 +845,7 @@ protected function _initializeSoapErrorContext() * Register a valid fault exception * * @param string|array $class Exception class or array of exception classes - * @return \Zend\Soap\Server + * @return Server */ public function registerFaultException($class) { diff --git a/src/Server/DocumentLiteralWrapper.php b/src/Server/DocumentLiteralWrapper.php index 0d5da93b..5bfa44dc 100644 --- a/src/Server/DocumentLiteralWrapper.php +++ b/src/Server/DocumentLiteralWrapper.php @@ -19,14 +19,12 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Server; -use ReflectionClass; -use Zend\Soap\Exception\UnexpectedValueException; -use Zend\Soap\Exception\BadMethodCallException; +use ReflectionClass, + ReflectionObject, + Zend\Soap\Exception\UnexpectedValueException, + Zend\Soap\Exception\BadMethodCallException; /** * Wraps WSDL Document/Literal Style service objects to hide SOAP request @@ -81,7 +79,6 @@ * $soap->setObject(new \Zend\Soap\Server\DocumentLiteralWrapper($service)); * $soap->handle(); * - * @uses ReflectionClass * @category Zend * @package Zend_Soap * @subpackage Server @@ -108,7 +105,7 @@ class DocumentLiteralWrapper public function __construct($object) { $this->_object = $object; - $this->_reflection = new \ReflectionObject($this->_object); + $this->_reflection = new ReflectionObject($this->_object); } /** diff --git a/src/Wsdl.php b/src/Wsdl.php index ad424799..5ef545ad 100644 --- a/src/Wsdl.php +++ b/src/Wsdl.php @@ -18,14 +18,12 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap; use DOMDocument, + DOMElement, Zend\Uri\Uri, - Zend\Soap\Wsdl\ComplexTypeStrategy; + Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTypeStrategy; /** * \Zend\Soap\Wsdl @@ -81,7 +79,7 @@ class Wsdl * * @param string $name Name of the Web Service being Described * @param string|Uri $uri URI where the WSDL will be available - * @param \Zend\Soap\Wsdl\ComplexTypeStrategy $strategy + * @param ComplexTypeStrategy $strategy */ public function __construct($name, $uri, ComplexTypeStrategy $strategy = null, array $classMap = array()) { @@ -159,7 +157,7 @@ public function setUri($uri) /** * Set a strategy for complex type detection and handling * - * @param \Zend\Soap\Wsdl\ComplexTypeStrategy $strategy + * @param ComplexTypeStrategy $strategy * @return \Zend\Soap\Wsdl */ public function setComplexTypeStrategy(ComplexTypeStrategy $strategy) @@ -171,7 +169,7 @@ public function setComplexTypeStrategy(ComplexTypeStrategy $strategy) /** * Get the current complex type strategy * - * @return \Zend\Soap\Wsdl\ComplexTypeStrategy + * @return ComplexTypeStrategy */ public function getComplexTypeStrategy() { diff --git a/src/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php b/src/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php index 60977177..2cec9bff 100644 --- a/src/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php +++ b/src/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php @@ -19,24 +19,18 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; -use Zend\Soap\Wsdl\ComplexTypeStrategy; - /** * Abstract class for Zend_Soap_Wsdl_Strategy. * - * @uses \Zend\Soap\Wsdl\Strategy * @category Zend * @package Zend_Soap * @subpackage WSDL * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -abstract class AbstractComplexTypeStrategy implements ComplexTypeStrategy +abstract class AbstractComplexTypeStrategy implements ComplexTypeStrategyInterface { /** * Context object diff --git a/src/Wsdl/ComplexTypeStrategy/AnyType.php b/src/Wsdl/ComplexTypeStrategy/AnyType.php index ad4c44b3..528b9a6b 100644 --- a/src/Wsdl/ComplexTypeStrategy/AnyType.php +++ b/src/Wsdl/ComplexTypeStrategy/AnyType.php @@ -19,24 +19,18 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; -use Zend\Soap\Wsdl\ComplexTypeStrategy; - /** * Zend_Soap_Wsdl_Strategy_AnyType * - * @uses \Zend\Soap\Wsdl\Strategy\StrategyInterface * @category Zend * @package Zend_Soap * @subpackage WSDL * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class AnyType implements ComplexTypeStrategy +class AnyType implements ComplexTypeStrategyInterface { /** * Not needed in this strategy. diff --git a/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php b/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php index a42a9b17..f96210c2 100644 --- a/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php +++ b/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php @@ -19,21 +19,13 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; -use Zend\Soap; - -use Zend\Soap\Wsdl; use Zend\Soap\Exception; /** * ArrayOfTypeComplex strategy * - * @uses \Zend\Soap\Wsdl\Exception - * @uses \Zend\Soap\Wsdl\Strategy\DefaultComplexType * @category Zend * @package Zend_Soap * @subpackage WSDL diff --git a/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php b/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php index f6fdab4d..1abe82b8 100644 --- a/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php +++ b/src/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php @@ -18,9 +18,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; use Zend\Soap\Wsdl; @@ -28,7 +25,6 @@ /** * Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence * - * @uses \Zend\Soap\Wsdl\Strategy\DefaultComplexType * @category Zend * @package Zend_Soap * @subpackage WSDL @@ -145,4 +141,4 @@ protected function _addSequenceType($arrayType, $childType, $phpArrayType) $this->getContext()->getSchema()->appendChild($complexType); } -} \ No newline at end of file +} diff --git a/src/Wsdl/ComplexTypeStrategy.php b/src/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php similarity index 94% rename from src/Wsdl/ComplexTypeStrategy.php rename to src/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php index 3e1d9725..f26c2f59 100644 --- a/src/Wsdl/ComplexTypeStrategy.php +++ b/src/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php @@ -19,10 +19,7 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ -namespace Zend\Soap\Wsdl; +namespace Zend\Soap\Wsdl\ComplexTypeStrategy; /** * Interface strategies that generate an XSD-Schema for complex data types in WSDL files. @@ -33,7 +30,7 @@ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -interface ComplexTypeStrategy +interface ComplexTypeStrategyInterface { /** * Method accepts the current WSDL context file. diff --git a/src/Wsdl/ComplexTypeStrategy/Composite.php b/src/Wsdl/ComplexTypeStrategy/Composite.php index a85ae677..be496b0e 100644 --- a/src/Wsdl/ComplexTypeStrategy/Composite.php +++ b/src/Wsdl/ComplexTypeStrategy/Composite.php @@ -19,20 +19,15 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; -use Zend\Soap\Wsdl\ComplexTypeStrategy, +use Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTypeStrategy, Zend\Soap\Exception, Zend\Soap\Wsdl; /** * Zend_Soap_Wsdl_Strategy_Composite * - * @uses \Zend\Soap\Wsdl\Exception - * @uses \Zend\Soap\Wsdl\Strategy\StrategyInterface * @category Zend * @package Zend_Soap * @subpackage WSDL @@ -51,7 +46,7 @@ class Composite implements ComplexTypeStrategy /** * Default Strategy of this composite * - * @var string|\Zend\Soap\Wsdl\Strategy + * @var string|ComplexTypeStrategy */ protected $_defaultStrategy; @@ -65,11 +60,10 @@ class Composite implements ComplexTypeStrategy /** * Construct Composite WSDL Strategy. * - * @throws \Zend\Soap\WsdlException * @param array $typeMap - * @param string|\Zend\Soap\Wsdl\Strategy $defaultStrategy + * @param string|ComplexTypeStrategy $defaultStrategy */ - public function __construct(array $typeMap=array(), $defaultStrategy='\Zend\Soap\Wsdl\Strategy\DefaultComplexType') + public function __construct(array $typeMap=array(), $defaultStrategy='\Zend\Soap\Wsdl\ComplexTypeStrategy\DefaultComplexType') { foreach($typeMap AS $type => $strategy) { $this->connectTypeToStrategy($type, $strategy); @@ -80,10 +74,10 @@ public function __construct(array $typeMap=array(), $defaultStrategy='\Zend\Soap /** * Connect a complex type to a given strategy. * - * @throws \Zend\Soap\WsdlException + * @throws Exception\InvalidArgumentException * @param string $type - * @param string|\Zend\Soap\Wsdl\Strategy $strategy - * @return \Zend\Soap\Wsdl\Strategy\Composite + * @param string|ComplexTypeStrategy $strategy + * @return Composite */ public function connectTypeToStrategy($type, $strategy) { @@ -97,9 +91,9 @@ public function connectTypeToStrategy($type, $strategy) /** * Return default strategy of this composite * - * @throws \Zend\Soap\WsdlException + * @throws Exception\InvalidArgumentException * @param string $type - * @return \Zend\Soap\Wsdl\Strategy + * @return ComplexTypeStrategy */ public function getDefaultStrategy() { @@ -119,9 +113,9 @@ public function getDefaultStrategy() /** * Return specific strategy or the default strategy of this type. * - * @throws \Zend\Soap\WsdlException + * @throws Exception\InvalidArgumentException * @param string $type - * @return \Zend\Soap\Wsdl\Strategy + * @return ComplexTypeStrategy */ public function getStrategyOfType($type) { @@ -158,7 +152,7 @@ public function setContext(Wsdl $context) /** * Create a complex type based on a strategy * - * @throws \Zend\Soap\WsdlException + * @throws Exception\InvalidArgumentException * @param string $type * @return string XSD type */ diff --git a/src/Wsdl/ComplexTypeStrategy/DefaultComplexType.php b/src/Wsdl/ComplexTypeStrategy/DefaultComplexType.php index 17238d09..767ea483 100644 --- a/src/Wsdl/ComplexTypeStrategy/DefaultComplexType.php +++ b/src/Wsdl/ComplexTypeStrategy/DefaultComplexType.php @@ -19,21 +19,13 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; -use Zend\Soap; - use Zend\Soap\Exception; /** * Zend_Soap_Wsdl_Strategy_DefaultComplexType * - * @uses ReflectionClass - * @uses \Zend\Soap\WsdlException - * @uses \Zend\Soap\Wsdl\Strategy\AbstractStrategy * @category Zend * @package Zend_Soap * @subpackage WSDL diff --git a/test/AutoDiscover/OnlineTest.php b/test/AutoDiscover/OnlineTest.php index dde513e2..d347d4d9 100644 --- a/test/AutoDiscover/OnlineTest.php +++ b/test/AutoDiscover/OnlineTest.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\AutoDiscover; require_once __DIR__ . '/../TestAsset/commontypes.php'; diff --git a/test/AutoDiscoverTest.php b/test/AutoDiscoverTest.php index c3602a1f..2b0ab878 100644 --- a/test/AutoDiscoverTest.php +++ b/test/AutoDiscoverTest.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap; /** Include Common TestTypes */ diff --git a/test/ClientTest.php b/test/ClientTest.php index 253a537a..f59bab55 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap; require_once __DIR__ . '/TestAsset/commontypes.php'; diff --git a/test/Server/DocumentLiteralWrapperTest.php b/test/Server/DocumentLiteralWrapperTest.php index 23a5f6f8..ae9c4e08 100644 --- a/test/Server/DocumentLiteralWrapperTest.php +++ b/test/Server/DocumentLiteralWrapperTest.php @@ -23,7 +23,6 @@ use Zend\Soap\Client\Local as SoapClient, Zend\Soap\Server, - Zend\Soap\ServerException, Zend\Soap\Server\DocumentLiteralWrapper, ZendTest\Soap\TestAsset\MyCalculatorService; diff --git a/test/ServerTest.php b/test/ServerTest.php index 249bdc51..ff76530a 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap; require_once __DIR__ . '/TestAsset/commontypes.php'; @@ -35,7 +32,6 @@ * @category Zend * @package Zend_Soap * @subpackage UnitTests - * @uses Zend_Server_Interface * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Soap diff --git a/test/TestAsset/commontypes.php b/test/TestAsset/commontypes.php index 615ea964..334c5a8b 100644 --- a/test/TestAsset/commontypes.php +++ b/test/TestAsset/commontypes.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\TestAsset; /* Test Functions */ diff --git a/test/TestAsset/fulltests/server1.php b/test/TestAsset/fulltests/server1.php index 2384c83b..4df21920 100644 --- a/test/TestAsset/fulltests/server1.php +++ b/test/TestAsset/fulltests/server1.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\TestAsset\fulltests; /** diff --git a/test/TestAsset/fulltests/server2.php b/test/TestAsset/fulltests/server2.php index 74520ec0..95ce1f32 100644 --- a/test/TestAsset/fulltests/server2.php +++ b/test/TestAsset/fulltests/server2.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\TestAsset\fulltests; /** diff --git a/test/Wsdl/ArrayOfTypeComplexStrategyTest.php b/test/Wsdl/ArrayOfTypeComplexStrategyTest.php index 49f5cc00..13e09826 100644 --- a/test/Wsdl/ArrayOfTypeComplexStrategyTest.php +++ b/test/Wsdl/ArrayOfTypeComplexStrategyTest.php @@ -19,15 +19,12 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\Wsdl; require_once __DIR__."/../TestAsset/commontypes.php"; use Zend\Soap\Wsdl; - +use \Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex; /** * @category Zend @@ -40,12 +37,15 @@ */ class ArrayOfTypeComplexStrategyTest extends \PHPUnit_Framework_TestCase { + /** @var \Zend\Soap\Wsdl */ private $wsdl; + + /** @var \Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex */ private $strategy; public function setUp() { - $this->strategy = new \Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex(); + $this->strategy = new ArrayOfTypeComplex(); $this->wsdl = new Wsdl('MyService', 'http://localhost/MyService.php', $this->strategy); } @@ -211,17 +211,4 @@ public function testArrayOfComplexNestedObjectsIsCoveredByStrategyAndAddsAllType 'No usage of Complex Type B array found.' ); } - - /** - * @group ZF-5754 - * @group ZF-8948 - */ - public function testNestingOfSameTypesDoesNotLeadToInfiniteRecursionButWillThrowException() - { - $this->markTestSkipped('It seems, it\'s obsolete.'); - return; - - $this->setExpectedException('Zend\Soap\Exception\InvalidArgumentException', 'Infinite recursion'); - $return = $this->wsdl->addComplexType('\ZendTest\Soap\TestAsset\Recursion'); - } } diff --git a/test/Wsdl/ArrayOfTypeSequenceStrategyTest.php b/test/Wsdl/ArrayOfTypeSequenceStrategyTest.php index 4b5a3147..17bd6e82 100644 --- a/test/Wsdl/ArrayOfTypeSequenceStrategyTest.php +++ b/test/Wsdl/ArrayOfTypeSequenceStrategyTest.php @@ -18,9 +18,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\Wsdl; require_once __DIR__ . '/../TestAsset/commontypes.php'; diff --git a/test/Wsdl/CompositeStrategyTest.php b/test/Wsdl/CompositeStrategyTest.php index fdbdbec7..31b8a6af 100644 --- a/test/Wsdl/CompositeStrategyTest.php +++ b/test/Wsdl/CompositeStrategyTest.php @@ -18,13 +18,10 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\Wsdl; + use Zend\Soap\Wsdl\ComplexTypeStrategy, Zend\Soap\Wsdl, - Zend\Soap\WsdlException, Zend\Soap\Wsdl\ComplexTypeStrategy\Composite, Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex, Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeSequence; diff --git a/test/Wsdl/DefaultComplexTypeTest.php b/test/Wsdl/DefaultComplexTypeTest.php index cb340bce..76dd87bd 100644 --- a/test/Wsdl/DefaultComplexTypeTest.php +++ b/test/Wsdl/DefaultComplexTypeTest.php @@ -19,9 +19,6 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap\Wsdl; use Zend\Soap\Wsdl\ComplexTypeStrategy\DefaultComplexType; diff --git a/test/WsdlTest.php b/test/WsdlTest.php index 2710f455..f17c8b1a 100644 --- a/test/WsdlTest.php +++ b/test/WsdlTest.php @@ -19,13 +19,8 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -/** - * @namespace - */ namespace ZendTest\Soap; use Zend\Soap\Wsdl, - Zend\Soap\WsdlException, - Zend\Soap\Wsdl\Strategy, Zend\Soap\Wsdl\ComplexTypeStrategy; /**