Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into rfc/escaper
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 39 changed files with 120 additions and 360 deletions.
42 changes: 21 additions & 21 deletions src/AutoDiscover.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand All @@ -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)
{
Expand All @@ -151,7 +149,7 @@ public function setDiscoveryStrategy(DiscoveryStrategy $discoveryStrategy)
}

/**
* @return AutoDiscover\DiscoveryStrategy
* @return DiscoveryStrategy
*/
public function getDiscoveryStrategy()
{
Expand Down Expand Up @@ -193,6 +191,7 @@ public function setServiceName($serviceName)
* Get service name
*
* @return string
* @throws Exception\RuntimeException
*/
public function getServiceName()
{
Expand All @@ -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)
{
Expand All @@ -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()
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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())
{
Expand All @@ -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())
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down
8 changes: 2 additions & 6 deletions src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
{
Expand Down
18 changes: 10 additions & 8 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace Zend\Soap;

use Traversable;
use Zend\Stdlib\ArrayUtils;
use Zend\Server\Client as ServerClient;

/**
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions src/Client/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/Client/DotNet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/Client/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
34 changes: 0 additions & 34 deletions src/Exception/AutoDiscoverException.php

This file was deleted.

5 changes: 2 additions & 3 deletions src/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

class BadMethodCallException
extends \BadMethodCallException
implements \Zend\Soap\Exception
{
}
implements ExceptionInterface
{}
10 changes: 3 additions & 7 deletions src/Exception.php → src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Soap;
namespace Zend\Soap\Exception;

/**
* @category Zend
Expand All @@ -31,6 +28,5 @@
* @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 Exception
{
}
interface ExceptionInterface
{}
7 changes: 2 additions & 5 deletions src/Exception/ExceptionNotLoadedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

namespace Zend\Soap\Exception;

class ExtensionNotLoadedException
extends \RuntimeException
implements \Zend\Soap\Exception
{
}
class ExtensionNotLoadedException extends RuntimeException
{}
5 changes: 2 additions & 3 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Soap\Exception
{
}
implements ExceptionInterface
{}
6 changes: 2 additions & 4 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@

class RuntimeException
extends \RuntimeException
implements \Zend\Soap\Exception
{

}
implements ExceptionInterface
{}
Loading

0 comments on commit f2338ea

Please sign in to comment.