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

Commit

Permalink
Merge branch 'master' into markup
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Markup/Parser/Textile.php
	library/Zend/Markup/Renderer/AbstractRenderer.php
	library/Zend/Markup/Renderer/Html.php
  • Loading branch information
kokx committed Oct 30, 2010
2 parents 91571ec + 91c2337 commit 0270a77
Show file tree
Hide file tree
Showing 55 changed files with 257 additions and 331 deletions.
9 changes: 5 additions & 4 deletions src/Client.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -254,7 +253,7 @@ public function doRequest($request, $response = null)
/**
* Exception thrown when an HTTP error occurs
*/
throw new Client\HttpException(
throw new Client\Exception\HttpException(
$httpResponse->getMessage(),
$httpResponse->getStatus()
);
Expand Down Expand Up @@ -335,8 +334,10 @@ public function call($method, $params=array())
/**
* Exception thrown when an XML-RPC fault is returned
*/
throw new Client\FaultException($fault->getMessage(),
$fault->getCode());
throw new Client\Exception\FaultException(
$fault->getMessage(),
$fault->getCode()
);
}

return $this->_lastResponse->getReturnValue();
Expand Down
3 changes: 1 addition & 2 deletions src/Client/Exception.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand All @@ -35,5 +34,5 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Exception extends \Zend\XmlRpc\Exception
interface Exception extends \Zend\XmlRpc\Exception
{}
Expand Up @@ -17,13 +17,12 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
* @namespace
*/
namespace Zend\XmlRpc\Client;
namespace Zend\XmlRpc\Client\Exception;

/**
* Thrown by Zend_XmlRpc_Client when an XML-RPC fault response is returned.
Expand All @@ -35,5 +34,7 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class FaultException extends Exception
class FaultException
extends \BadMethodCallException
implements \Zend\XmlRpc\Client\Exception
{}
Expand Up @@ -17,13 +17,12 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
* @namespace
*/
namespace Zend\XmlRpc\Client;
namespace Zend\XmlRpc\Client\Exception;

/**
* Thrown by Zend_XmlRpc_Client when an HTTP error occurs during an
Expand All @@ -36,5 +35,7 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class HttpException extends Exception
class HttpException
extends RuntimeException
implements \Zend\XmlRpc\Client\Exception
{}
Expand Up @@ -17,13 +17,12 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
* @namespace
*/
namespace Zend\XmlRpc\Client;
namespace Zend\XmlRpc\Client\Exception;

/**
* Thrown by Zend_XmlRpc_Client_Introspection when any error occurs.
Expand All @@ -35,5 +34,7 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class IntrospectException extends Exception
class IntrospectException
extends \InvalidArgumentException
implements \Zend\XmlRpc\Client\Exception
{}
9 changes: 9 additions & 0 deletions src/Client/Exception/InvalidArgumentException.php
@@ -0,0 +1,9 @@
<?php

namespace Zend\XmlRpc\Exception;

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

9 changes: 9 additions & 0 deletions src/Client/Exception/RuntimeException.php
@@ -0,0 +1,9 @@
<?php

namespace Zend\XmlRpc\Client\Exception;

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

7 changes: 3 additions & 4 deletions src/Client/ServerIntrospection.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -103,12 +102,12 @@ public function getSignatureForEachMethodByMulticall($methods = null)
if (! is_array($serverSignatures)) {
$type = gettype($serverSignatures);
$error = "Multicall return is malformed. Expected array, got $type";
throw new IntrospectException($error);
throw new Exception\IntrospectException($error);
}

if (count($serverSignatures) != count($methods)) {
$error = 'Bad number of signatures received from multicall';
throw new IntrospectException($error);
throw new Exception\IntrospectException($error);
}

// Create a new signatures array with the methods name as keys and the signature as value
Expand Down Expand Up @@ -152,7 +151,7 @@ public function getMethodSignature($method)
$signature = $this->_system->methodSignature($method);
if (!is_array($signature)) {
$error = 'Invalid signature for method "' . $method . '"';
throw new IntrospectException($error);
throw new Exception\IntrospectException($error);
}
return $signature;
}
Expand Down
1 change: 0 additions & 1 deletion src/Client/ServerProxy.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Client
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Exception.php
Expand Up @@ -16,7 +16,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand All @@ -31,6 +30,5 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Exception extends \Zend\Exception
interface Exception
{}

9 changes: 9 additions & 0 deletions src/Exception/InvalidArgumentException.php
@@ -0,0 +1,9 @@
<?php

namespace Zend\XmlRpc\Exception;

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

9 changes: 9 additions & 0 deletions src/Exception/RuntimeException.php
@@ -0,0 +1,9 @@
<?php

namespace Zend\XmlRpc\Exception;

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

7 changes: 4 additions & 3 deletions src/Value/Exception.php → src/Exception/ValueException.php
Expand Up @@ -17,13 +17,12 @@
* @subpackage Value
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
* @namespace
*/
namespace Zend\XmlRpc\Value;
namespace Zend\XmlRpc\Exception;

/**
* @uses \Zend\XmlRpc\Exception
Expand All @@ -33,6 +32,8 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Exception extends \Zend\XmlRpc\Exception
class ValueException
extends \LogicException
implements \Zend\XmlRpc\Exception
{}

9 changes: 4 additions & 5 deletions src/Fault.php
Expand Up @@ -16,7 +16,6 @@
* @subpackage Server
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -197,14 +196,14 @@ public function getEncoding()
public function loadXml($fault)
{
if (!is_string($fault)) {
throw new Exception('Invalid XML provided to fault');
throw new Exception\InvalidArgumentException('Invalid XML provided to fault');
}

try {
$xml = new \SimpleXMLElement($fault);
} catch (\Exception $e) {
// Not valid XML
throw new Exception('Failed to parse XML fault: ' . $e->getMessage(), 500, $e);
throw new Exception\InvalidArgumentException('Failed to parse XML fault: ' . $e->getMessage(), 500, $e);
}

// Check for fault
Expand All @@ -215,7 +214,7 @@ public function loadXml($fault)

if (!$xml->fault->value->struct) {
// not a proper fault
throw new Exception('Invalid fault structure', 500);
throw new Exception\InvalidArgumentException('Invalid fault structure', 500);
}

$structXml = $xml->fault->value->asXML();
Expand All @@ -230,7 +229,7 @@ public function loadXml($fault)
}

if (empty($code) && empty($message)) {
throw new Exception('Fault code and string required');
throw new Exception\InvalidArgumentException('Fault code and string required');
}

if (empty($code)) {
Expand Down
1 change: 0 additions & 1 deletion src/Generator.php
Expand Up @@ -16,7 +16,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Generator/AbstractGenerator.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Generator
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Generator/DomDocument.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Generator
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Generator/XmlWriter.php
Expand Up @@ -17,7 +17,6 @@
* @subpackage Generator
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Request.php
Expand Up @@ -41,7 +41,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Request
{
Expand Down
1 change: 0 additions & 1 deletion src/Request/Http.php
Expand Up @@ -39,7 +39,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Http extends XmlRpcRequest
{
Expand Down
1 change: 0 additions & 1 deletion src/Request/Stdin.php
Expand Up @@ -39,7 +39,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Stdin extends XmlRpcRequest
{
Expand Down
3 changes: 1 addition & 2 deletions src/Response.php
Expand Up @@ -36,7 +36,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Response
{
Expand Down Expand Up @@ -204,7 +203,7 @@ public function loadXml($response)

try {
if (!isset($xml->params) || !isset($xml->params->param) || !isset($xml->params->param->value)) {
throw new Value\Exception('Missing XML-RPC value in XML');
throw new Exception\ValueException('Missing XML-RPC value in XML');
}
$valueXml = $xml->params->param->value->asXML();
$value = Value::getXmlRpcValue($valueXml, Value::XML_STRING);
Expand Down
1 change: 0 additions & 1 deletion src/Response/Http.php
Expand Up @@ -33,7 +33,6 @@
* @package Zend_XmlRpc
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Http extends XmlRpcResponse
{
Expand Down

0 comments on commit 0270a77

Please sign in to comment.