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

Commit

Permalink
Merge remote-tracking branch 'prolic/xmlrpc-renamed-interfaces'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function call($method, $params=array())
$success = true;
try {
$signatures = $this->getIntrospector()->getMethodSignature($method);
} catch (\Zend\XmlRpc\Exception $e) {
} catch (\Zend\XmlRpc\Exception\ExceptionInterface $e) {
$success = false;
}
if ($success) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\XmlRpc\Client;
namespace Zend\XmlRpc\Client\Exception;

/**
* Base class for all Zend_XmlRpc_Client_* exceptions
*
* @uses Zend\XmlRpc\Exception
* @uses Zend\XmlRpc\Exception\ExceptionInterface
* @category Zend
* @package Zend_XmlRpc
* @subpackage Client
* @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 extends \Zend\XmlRpc\Exception
interface ExceptionInterface extends \Zend\XmlRpc\Exception\ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/FaultException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
*/
class FaultException
extends \BadMethodCallException
implements \Zend\XmlRpc\Client\Exception
implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/IntrospectException.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
*/
class IntrospectException
extends \InvalidArgumentException
implements \Zend\XmlRpc\Client\Exception
implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\XmlRpc\Exception
implements \Zend\XmlRpc\Exception\ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Client/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class RuntimeException
extends \RuntimeException
implements \Zend\XmlRpc\Client\Exception
implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}

4 changes: 2 additions & 2 deletions src/Exception.php → src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\XmlRpc;
namespace Zend\XmlRpc\Exception;

/**
* @category Zend
* @package Zend_XmlRpc
* @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
{}
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\XmlRpc\Exception
implements \Zend\XmlRpc\Exception\ExceptionInterface
{}

2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class RuntimeException
extends \RuntimeException
implements \Zend\XmlRpc\Exception
implements \Zend\XmlRpc\Exception\ExceptionInterface
{}

4 changes: 2 additions & 2 deletions src/Exception/ValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace Zend\XmlRpc\Exception;

/**
* @uses \Zend\XmlRpc\Exception
* @uses Zend\XmlRpc\Exception\ExceptionInterface
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
Expand All @@ -31,6 +31,6 @@
*/
class ValueException
extends \LogicException
implements \Zend\XmlRpc\Exception
implements \Zend\XmlRpc\Exception\ExceptionInterface
{}

12 changes: 6 additions & 6 deletions src/Fault.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* to instantiate a Zend_XmlRpc_Server_Fault.
*
* @uses SimpleXMLElement
* @uses Zend\XmlRpc\Exception
* @uses Zend\XmlRpc\Exception\ExceptionInterface
* @uses Zend\XmlRpc\Value\Value
* @category Zend
* @package Zend_XmlRpc
Expand Down Expand Up @@ -118,7 +118,7 @@ public function __construct($code = 404, $message = '')
* Set the fault code
*
* @param int $code
* @return Zend\XmlRpc\Fault
* @return Fault
*/
public function setCode($code)
{
Expand All @@ -140,7 +140,7 @@ public function getCode()
* Retrieve fault message
*
* @param string
* @return Zend\XmlRpc\Fault
* @return Fault
*/
public function setMessage($message)
{
Expand All @@ -162,7 +162,7 @@ public function getMessage()
* Set encoding to use in fault response
*
* @param string $encoding
* @return Zend\XmlRpc\Fault
* @return Fault
*/
public function setEncoding($encoding)
{
Expand All @@ -187,7 +187,7 @@ public function getEncoding()
* @param string $fault
* @return boolean Returns true if successfully loaded fault response, false
* if response was not a fault response
* @throws Zend\XmlRpc\Exception if no or faulty XML provided, or if fault
* @throws \Zend\XmlRpc\Exception\ExceptionInterface if no or faulty XML provided, or if fault
* response does not contain either code or message
*/
public function loadXml($fault)
Expand Down Expand Up @@ -258,7 +258,7 @@ public static function isFault($xml)
$fault = new self();
try {
$isFault = $fault->loadXml($xml);
} catch (Exception $e) {
} catch (Exception\ExceptionInterface $e) {
$isFault = false;
}

Expand Down
12 changes: 5 additions & 7 deletions src/Generator/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@

namespace Zend\XmlRpc\Generator;

use Zend\XmlRpc\Generator as GeneratorAdapter;

/**
* Abstract XML generator adapter
*
* @uses Zend\XmlRpc\Generator
* @uses Zend\XmlRpc\Generator\GeneratorInterface
*/
abstract class AbstractGenerator implements GeneratorAdapter
abstract class AbstractGenerator implements GeneratorInterface
{
/**
* XML encoding string
Expand Down Expand Up @@ -62,7 +60,7 @@ abstract protected function _init();
*
* @param string $name XML tag name
* @param string $value Optional value of the XML tag
* @return Zend_XmlRpc_Generator_Abstract Fluent interface
* @return AbstractGenerator Fluent interface
*/
public function openElement($name, $value = null)
{
Expand All @@ -80,7 +78,7 @@ public function openElement($name, $value = null)
* Method marks the end of an XML element
*
* @param string $name XML tag name
* @return Zend_XmlRpc_Generator_Abstract Fluent interface
* @return AbstractGenerator Fluent interface
*/
public function closeElement($name)
{
Expand All @@ -103,7 +101,7 @@ public function getEncoding()
* Set XML encoding
*
* @param string $encoding
* @return Zend\XmlRpc\Generator\AbstractGenerator
* @return AbstractGenerator
*/
public function setEncoding($encoding)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Generator.php → src/Generator/GeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\XmlRpc;
namespace Zend\XmlRpc\Generator;

/**
* XML generator adapter interface
*/
interface Generator
interface GeneratorInterface
{
public function getEncoding();
public function setEncoding($encoding);
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/XmlWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function _writeTextData($text)
* Close an previously opened XML element
*
* @param string $name
* @return void
* @return XmlWriter
*/
protected function _closeElement($name)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class BadMethodCallException
extends \BadMethodCallException
implements \Zend\XmlRpc\Server\Exception
implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\XmlRpc\Server;
namespace Zend\XmlRpc\Server\Exception;

/**
* Zend_XmlRpc_Server_Exception
*
* @uses \Zend\XmlRpc\Exception
* @uses Zend\XmlRpc\Exception\ExceptionInterface
* @category Zend
* @package Zend_XmlRpc
* @subpackage Server
* @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 extends \Zend\XmlRpc\Exception
interface ExceptionInterface extends \Zend\XmlRpc\Exception\ExceptionInterface
{
}

2 changes: 1 addition & 1 deletion src/Server/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\XmlRpc\Server\Exception
implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Server/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class RuntimeException
extends \RuntimeException
implements \Zend\XmlRpc\Server\Exception
implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
12 changes: 6 additions & 6 deletions src/Server/Fault.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
class Fault extends \Zend\XmlRpc\Fault
{
/**
* @var Exception
* @var \Exception
*/
protected $_exception;

/**
* @var array Array of exception classes that may define xmlrpc faults
*/
protected static $_faultExceptionClasses = array('Zend\\XmlRpc\\Server\\Exception' => true);
protected static $_faultExceptionClasses = array('Zend\\XmlRpc\\Server\\Exception\\ExceptionInterface' => true);

/**
* @var array Array of fault observers
Expand All @@ -63,8 +63,8 @@ class Fault extends \Zend\XmlRpc\Fault
/**
* Constructor
*
* @param Exception $e
* @return Zend\XmlRpc\Server\Fault
* @param \Exception $e
* @return Fault
*/
public function __construct(\Exception $e)
{
Expand Down Expand Up @@ -94,8 +94,8 @@ public function __construct(\Exception $e)
/**
* Return Zend\XmlRpc\Server\Fault instance
*
* @param Exception $e
* @return Zend\XmlRpc\Server\Fault
* @param \Exception $e
* @return Fault
*/
public static function getInstance(\Exception $e)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function getType()
/**
* Get XML generator instance
*
* @return Zend\XmlRpc\Generator
* @return \Zend\XmlRpc\Generator\GeneratorInterface
*/
public static function getGenerator()
{
Expand All @@ -132,10 +132,10 @@ public static function getGenerator()
/**
* Sets XML generator instance
*
* @param null|Generator $generator
* @param null|Generator\GeneratorInterface $generator
* @return void
*/
public static function setGenerator(Generator $generator = null)
public static function setGenerator(Generator\GeneratorInterface $generator = null)
{
self::$_generator = $generator;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Value/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Zend\XmlRpc\Exception;

/**
* @uses Zend\XmlRpc\Value\Exception
* @uses Zend\XmlRpc\Value\Exception\ExceptionInterface
* @uses Zend\XmlRpc\Value\Scalar
* @category Zend
* @package Zend_XmlRpc
Expand Down
2 changes: 1 addition & 1 deletion src/Value/Integer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Zend\XmlRpc\Exception;

/**
* @uses \Zend\XmlRpc\Value\Exception
* @uses \Zend\XmlRpc\Value\Exception\ExceptionInterface
* @uses \Zend\XmlRpc\Value\Scalar
* @category Zend
* @package Zend_XmlRpc
Expand Down
3 changes: 1 addition & 2 deletions test/FaultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
class FaultTest extends \PHPUnit_Framework_TestCase
{
/**
* Zend_XmlRpc_Fault object
* @var Zend_XmlRpc_Fault
* @var XmlRpc\Fault
*/
protected $_fault;

Expand Down
2 changes: 1 addition & 1 deletion test/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace ZendTest\XmlRpc;

use Zend\XmlRpc\Generator;
use Zend\XmlRpc\Generator\GeneratorInterface as Generator;

/**
* Test case for Zend_XmlRpc_Generator_*
Expand Down
Loading

0 comments on commit 79d20ae

Please sign in to comment.