Permalink
Browse files

Merge remote-tracking branch 'prolic/xmlrpc-renamed-interfaces'

  • Loading branch information...
2 parents 61d88eb + 27e50bf commit 4de53df461ced063c9fe544e599f9c586907105d @EvanDotPro EvanDotPro committed Apr 25, 2012
Showing with 53 additions and 56 deletions.
  1. +1 −1 library/Zend/XmlRpc/Client.php
  2. +3 −3 library/Zend/XmlRpc/Client/{Exception.php → Exception/ExceptionInterface.php}
  3. +1 −1 library/Zend/XmlRpc/Client/Exception/FaultException.php
  4. +1 −1 library/Zend/XmlRpc/Client/Exception/IntrospectException.php
  5. +1 −1 library/Zend/XmlRpc/Client/Exception/InvalidArgumentException.php
  6. +1 −1 library/Zend/XmlRpc/Client/Exception/RuntimeException.php
  7. +2 −2 library/Zend/XmlRpc/{Exception.php → Exception/ExceptionInterface.php}
  8. +1 −1 library/Zend/XmlRpc/Exception/InvalidArgumentException.php
  9. +1 −1 library/Zend/XmlRpc/Exception/RuntimeException.php
  10. +2 −2 library/Zend/XmlRpc/Exception/ValueException.php
  11. +6 −6 library/Zend/XmlRpc/Fault.php
  12. +5 −7 library/Zend/XmlRpc/Generator/AbstractGenerator.php
  13. +2 −2 library/Zend/XmlRpc/{Generator.php → Generator/GeneratorInterface.php}
  14. +1 −1 library/Zend/XmlRpc/Generator/XmlWriter.php
  15. +1 −1 library/Zend/XmlRpc/Server/Exception/BadMethodCallException.php
  16. +3 −3 library/Zend/XmlRpc/Server/{Exception.php → Exception/ExceptionInterface.php}
  17. +1 −1 library/Zend/XmlRpc/Server/Exception/InvalidArgumentException.php
  18. +1 −1 library/Zend/XmlRpc/Server/Exception/RuntimeException.php
  19. +6 −6 library/Zend/XmlRpc/Server/Fault.php
  20. +3 −3 library/Zend/XmlRpc/Value.php
  21. +1 −1 library/Zend/XmlRpc/Value/DateTime.php
  22. +1 −1 library/Zend/XmlRpc/Value/Integer.php
  23. +1 −2 tests/Zend/XmlRpc/FaultTest.php
  24. +1 −1 tests/Zend/XmlRpc/GeneratorTest.php
  25. +5 −5 tests/Zend/XmlRpc/ServerTest.php
  26. +1 −1 tests/Zend/XmlRpc/ValueTest.php
@@ -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) {
@@ -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
{}
@@ -33,5 +33,5 @@
*/
class FaultException
extends \BadMethodCallException
- implements \Zend\XmlRpc\Client\Exception
+ implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}
@@ -33,5 +33,5 @@
*/
class IntrospectException
extends \InvalidArgumentException
- implements \Zend\XmlRpc\Client\Exception
+ implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}
@@ -4,5 +4,5 @@
class InvalidArgumentException
extends \InvalidArgumentException
- implements \Zend\XmlRpc\Exception
+ implements \Zend\XmlRpc\Exception\ExceptionInterface
{}
@@ -4,6 +4,6 @@
class RuntimeException
extends \RuntimeException
- implements \Zend\XmlRpc\Client\Exception
+ implements \Zend\XmlRpc\Client\Exception\ExceptionInterface
{}
@@ -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
{}
@@ -4,6 +4,6 @@
class InvalidArgumentException
extends \InvalidArgumentException
- implements \Zend\XmlRpc\Exception
+ implements \Zend\XmlRpc\Exception\ExceptionInterface
{}
@@ -4,6 +4,6 @@
class RuntimeException
extends \RuntimeException
- implements \Zend\XmlRpc\Exception
+ implements \Zend\XmlRpc\Exception\ExceptionInterface
{}
@@ -22,7 +22,7 @@
namespace Zend\XmlRpc\Exception;
/**
- * @uses \Zend\XmlRpc\Exception
+ * @uses Zend\XmlRpc\Exception\ExceptionInterface
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
@@ -31,6 +31,6 @@
*/
class ValueException
extends \LogicException
- implements \Zend\XmlRpc\Exception
+ implements \Zend\XmlRpc\Exception\ExceptionInterface
{}
@@ -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
@@ -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)
{
@@ -140,7 +140,7 @@ public function getCode()
* Retrieve fault message
*
* @param string
- * @return Zend\XmlRpc\Fault
+ * @return Fault
*/
public function setMessage($message)
{
@@ -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)
{
@@ -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)
@@ -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;
}
@@ -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
@@ -62,7 +60,7 @@ public function __construct($encoding = 'UTF-8')
*
* @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)
{
@@ -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)
{
@@ -103,7 +101,7 @@ public function getEncoding()
* Set XML encoding
*
* @param string $encoding
- * @return Zend\XmlRpc\Generator\AbstractGenerator
+ * @return AbstractGenerator
*/
public function setEncoding($encoding)
{
@@ -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);
@@ -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)
{
@@ -4,5 +4,5 @@
class BadMethodCallException
extends \BadMethodCallException
- implements \Zend\XmlRpc\Server\Exception
+ implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
@@ -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
{
}
@@ -4,5 +4,5 @@
class InvalidArgumentException
extends \InvalidArgumentException
- implements \Zend\XmlRpc\Server\Exception
+ implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
@@ -4,5 +4,5 @@
class RuntimeException
extends \RuntimeException
- implements \Zend\XmlRpc\Server\Exception
+ implements \Zend\XmlRpc\Server\Exception\ExceptionInterface
{}
@@ -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
@@ -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)
{
@@ -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)
{
@@ -114,7 +114,7 @@ public function getType()
/**
* Get XML generator instance
*
- * @return Zend\XmlRpc\Generator
+ * @return \Zend\XmlRpc\Generator\GeneratorInterface
*/
public static function getGenerator()
{
@@ -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;
}
@@ -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
@@ -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
@@ -37,8 +37,7 @@
class FaultTest extends \PHPUnit_Framework_TestCase
{
/**
- * Zend_XmlRpc_Fault object
- * @var Zend_XmlRpc_Fault
+ * @var XmlRpc\Fault
*/
protected $_fault;
@@ -21,7 +21,7 @@
namespace ZendTest\XmlRpc;
-use Zend\XmlRpc\Generator;
+use Zend\XmlRpc\Generator\GeneratorInterface as Generator;
/**
* Test case for Zend_XmlRpc_Generator_*
Oops, something went wrong.

0 comments on commit 4de53df

Please sign in to comment.