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

Commit 91571ec

Browse files
committed
Merge branch 'master' into markup
Conflicts: library/Zend/Markup/Parser/BBCode.php library/Zend/Markup/Renderer/HTML.php library/Zend/Markup/Renderer/RendererAbstract.php
3 parents 310518c + 906c7b6 + 0da7bb6 commit 91571ec

File tree

15 files changed

+51
-57
lines changed

15 files changed

+51
-57
lines changed

src/Client.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
* @namespace
2525
*/
2626
namespace Zend\XmlRpc;
27-
use Zend\HTTP,
27+
use Zend\Http,
2828
Zend\XmlRpc\Value;
2929

3030
/**
3131
* An XML-RPC client implementation
3232
*
33-
* @uses Zend\HTTP\Client
33+
* @uses Zend\Http\Client
3434
* @uses Zend\XmlRpc\Client\FaultException
35-
* @uses Zend\XmlRpc\Client\HTTPException
35+
* @uses Zend\XmlRpc\Client\HttpException
3636
* @uses Zend\XmlRpc\Client\ServerIntrospection
3737
* @uses Zend\XmlRpc\Client\ServerProxy
3838
* @uses Zend\XmlRpc\Fault
@@ -56,7 +56,7 @@ class Client
5656

5757
/**
5858
* HTTP Client to use for requests
59-
* @var Zend\HTTP\Client
59+
* @var Zend\Http\Client
6060
*/
6161
protected $_httpClient = null;
6262

@@ -95,13 +95,13 @@ class Client
9595
*
9696
* @param string $server Full address of the XML-RPC service
9797
* (e.g. http://time.xmlrpc.com/RPC2)
98-
* @param Zend\HTTP\Client $httpClient HTTP Client to use for requests
98+
* @param Zend\Http\Client $httpClient HTTP Client to use for requests
9999
* @return void
100100
*/
101-
public function __construct($server, HTTP\Client $httpClient = null)
101+
public function __construct($server, Http\Client $httpClient = null)
102102
{
103103
if ($httpClient === null) {
104-
$this->_httpClient = new HTTP\Client();
104+
$this->_httpClient = new Http\Client();
105105
} else {
106106
$this->_httpClient = $httpClient;
107107
}
@@ -114,10 +114,10 @@ public function __construct($server, HTTP\Client $httpClient = null)
114114
/**
115115
* Sets the HTTP client object to use for connecting the XML-RPC server.
116116
*
117-
* @param Zend\HTTP\Client $httpClient
118-
* @return Zend\HTTP\Client
117+
* @param Zend\Http\Client $httpClient
118+
* @return Zend\Http\Client
119119
*/
120-
public function setHttpClient(HTTP\Client $httpClient)
120+
public function setHttpClient(Http\Client $httpClient)
121121
{
122122
return $this->_httpClient = $httpClient;
123123
}
@@ -126,7 +126,7 @@ public function setHttpClient(HTTP\Client $httpClient)
126126
/**
127127
* Gets the HTTP client object.
128128
*
129-
* @return Zend\HTTP\Client
129+
* @return Zend\Http\Client
130130
*/
131131
public function getHttpClient()
132132
{
@@ -222,7 +222,7 @@ public function skipSystemLookup()
222222
* @param Zend\XmlRpc\Request $request
223223
* @param null|Zend\XmlRpc\Response $response
224224
* @return void
225-
* @throws Zend\XmlRpc\Client\HTTPException
225+
* @throws Zend\XmlRpc\Client\HttpException
226226
*/
227227
public function doRequest($request, $response = null)
228228
{
@@ -248,13 +248,13 @@ public function doRequest($request, $response = null)
248248

249249
$xml = $this->_lastRequest->__toString();
250250
$http->setRawData($xml);
251-
$httpResponse = $http->request(HTTP\Client::POST);
251+
$httpResponse = $http->request(Http\Client::POST);
252252

253253
if (! $httpResponse->isSuccessful()) {
254254
/**
255255
* Exception thrown when an HTTP error occurs
256256
*/
257-
throw new Client\HTTPException(
257+
throw new Client\HttpException(
258258
$httpResponse->getMessage(),
259259
$httpResponse->getStatus()
260260
);

src/Client/HTTPException.php renamed to src/Client/HttpException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
3737
* @license http://framework.zend.com/license/new-bsd New BSD License
3838
*/
39-
class HTTPException extends Exception
39+
class HttpException extends Exception
4040
{}

src/Request/HTTP.php renamed to src/Request/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @license http://framework.zend.com/license/new-bsd New BSD License
4242
* @version $Id$
4343
*/
44-
class HTTP extends XmlRpcRequest
44+
class Http extends XmlRpcRequest
4545
{
4646
/**
4747
* Array of headers

src/Response/HTTP.php renamed to src/Response/Http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @license http://framework.zend.com/license/new-bsd New BSD License
3636
* @version $Id$
3737
*/
38-
class HTTP extends XmlRpcResponse
38+
class Http extends XmlRpcResponse
3939
{
4040
/**
4141
* Override __toString() to send HTTP Content-Type header

src/Server.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
* @uses ReflectionClass
6363
* @uses Zend\Server\AbstractServer
6464
* @uses Zend\Server\Definition
65-
* @uses Zend\Server\Reflection\Reflection
65+
* @uses Zend\Server\Reflection
6666
* @uses Zend\Server\Reflection\AbstractFunction
6767
* @uses Zend\Server\Reflection\ReflectionMethod
6868
* @uses Zend\XmlRpc\Request
69-
* @uses Zend\XmlRpc\Request\HTTP
69+
* @uses Zend\XmlRpc\Request\Http
7070
* @uses Zend\XmlRpc\Response
71-
* @uses Zend\XmlRpc\Response\HTTP
71+
* @uses Zend\XmlRpc\Response\Http
7272
* @uses Zend\XmlRpc\Server\Exception
7373
* @uses Zend\XmlRpc\Server\Fault
7474
* @uses Zend\XmlRpc\Server\System
@@ -94,10 +94,10 @@ class Server extends AbstractServer
9494
protected $_request = null;
9595

9696
/**
97-
* Class to use for responses; defaults to {@link Zend\XmlRpc\Response\HTTP}
97+
* Class to use for responses; defaults to {@link Zend\XmlRpc\Response\Http}
9898
* @var string
9999
*/
100-
protected $_responseClass = 'Zend\\XmlRpc\\Response\\HTTP';
100+
protected $_responseClass = 'Zend\\XmlRpc\\Response\\Http';
101101

102102
/**
103103
* Dispatch table of name => method pairs
@@ -211,7 +211,7 @@ public function addFunction($function, $namespace = '')
211211
if (!is_string($func) || !function_exists($func)) {
212212
throw new Server\Exception('Unable to attach function; invalid', 611);
213213
}
214-
$reflection = Reflection\Reflection::reflectFunction($func, $argv, $namespace);
214+
$reflection = Reflection::reflectFunction($func, $argv, $namespace);
215215
$this->_buildSignature($reflection);
216216
}
217217
}
@@ -245,7 +245,7 @@ public function setClass($class, $namespace = '', $argv = null)
245245
$argv = array_slice($argv, 2);
246246
}
247247

248-
$dispatchable = Reflection\Reflection::reflectClass($class, $argv, $namespace);
248+
$dispatchable = Reflection::reflectClass($class, $argv, $namespace);
249249
foreach ($dispatchable->getMethods() as $reflection) {
250250
$this->_buildSignature($reflection, $class);
251251
}
@@ -283,7 +283,7 @@ public function handle($request = false)
283283
if ((!$request || !$request instanceof Request)
284284
&& (null === ($request = $this->getRequest()))
285285
) {
286-
$request = new Request\HTTP();
286+
$request = new Request\Http();
287287
$request->setEncoding($this->getEncoding());
288288
}
289289

src/Server/Fault.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __construct(\Exception $e)
9090
// Notify exception observers, if present
9191
if (!empty(self::$_observers)) {
9292
foreach (array_keys(self::$_observers) as $observer) {
93-
call_user_func(array($observer, 'observe'), $this);
93+
$observer::observe($this);
9494
}
9595
}
9696
}

src/Value.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ public function saveXml()
174174
{
175175
if (!$this->_xml) {
176176
$this->generateXml();
177+
$this->_xml = (string) $this->getGenerator();
177178
}
178179
return $this->_xml;
179180
}
@@ -185,9 +186,7 @@ public function saveXml()
185186
*/
186187
public function generateXml()
187188
{
188-
if (!$this->_xml) {
189-
$this->_generateXml();
190-
}
189+
$this->_generateXml();
191190
}
192191

193192
/**
@@ -276,7 +275,7 @@ protected static function _phpVarToNativeXmlRpc($value)
276275
return $value;
277276
}
278277

279-
if ($value instanceof \Zend\Crypt\Math\BigInteger\BigInteger) {
278+
if ($value instanceof \Zend\Crypt\Math\BigInteger) {
280279
return new Value\BigInteger($value);
281280
}
282281

src/Value/ArrayValue.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ protected function _generateXml()
6767
$generator->closeElement('data')
6868
->closeElement('array')
6969
->closeElement('value');
70-
71-
$this->_xml = (string)$generator;
7270
}
7371
}
7472

src/Value/BigInteger.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
namespace Zend\XmlRpc\Value;
2727

2828
/**
29-
* @uses \Zend\Crypt\Math\BigInteger\BigInteger
29+
* @uses \Zend\Crypt\Math\BigInteger
3030
* @uses \Zend\XmlRpc\Value\Integer
3131
* @category Zend
3232
* @package Zend_XmlRpc
@@ -37,7 +37,7 @@
3737
class BigInteger extends Integer
3838
{
3939
/**
40-
* @var \Zend\Crypt\Math\BigInteger\BigInteger
40+
* @var \Zend\Crypt\Math\BigInteger
4141
*/
4242
protected $_integer;
4343

@@ -46,15 +46,15 @@ class BigInteger extends Integer
4646
*/
4747
public function __construct($value)
4848
{
49-
$this->_integer = new \Zend\Crypt\Math\BigInteger\BigInteger();
49+
$this->_integer = new \Zend\Crypt\Math\BigInteger();
5050
$this->_value = $this->_integer->init($this->_value);
5151
$this->_type = self::XMLRPC_TYPE_I8;
5252
}
5353

5454
/**
5555
* Return bigint value object
5656
*
57-
* @return \Zend\Crypt\Math\BigInteger\BigInteger
57+
* @return \Zend\Crypt\Math\BigInteger
5858
*/
5959
public function getValue()
6060
{

src/Value/Scalar.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,5 @@ protected function _generateXml()
5050
->openElement($this->_type, $this->_value)
5151
->closeElement($this->_type)
5252
->closeElement('value');
53-
54-
$this->_xml = (string)$generator;
5553
}
5654
}

0 commit comments

Comments
 (0)