XmlRpc/Fault.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_XmlRpc  
Subpackage
Server  
Version
$Id$  

\Zend_XmlRpc_Fault

Package: Zend_XmlRpc
XMLRPC Faults
Container for XMLRPC faults, containing both a code and a message; additionally, has methods for determining if an XML response is an XMLRPC fault, as well as generating the XML for an XMLRPC fault response. To allow method chaining, you may only use the {@link getInstance()} factory to instantiate a Zend_XmlRpc_Server_Fault.
Children
\Zend_XmlRpc_Server_Fault
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedint $_code
Fault code
Details
Type
int
>VPropertyprotectedstring $_encoding = 'UTF-8'
Fault character encoding
Default value'UTF-8'Details
Type
string
>VPropertyprotectedarray $_internal = array(404 => 'Unknown Error', 610 => 'Invalid method class', 611 => 'Unable to attach function or callback; not callable', 612 => 'Unable to load array; not an array', 613 => 'One or more method records are corrupt or otherwise unusable', 620 => 'Method does not exist', 621 => 'Error instantiating class to invoke method', 622 => 'Method missing implementation', 623 => 'Calling parameters do not match signature', 630 => 'Unable to read request', 631 => 'Failed to parse request', 632 => 'Invalid request, no method passed; request must contain a \'methodName\' tag', 633 => 'Param must contain a value', 634 => 'Invalid method name', 635 => 'Invalid XML provided to request', 636 => 'Error creating xmlrpc value', 640 => 'Method does not exist', 650 => 'Invalid XML provided for response', 651 => 'Failed to parse response', 652 => 'Invalid response', 653 => 'Invalid XMLRPC value in response')
Internal fault codes => messages
Default valuearray(404 => 'Unknown Error', 610 => 'Invalid method class', 611 => 'Unable to attach function or callback; not callable', 612 => 'Unable to load array; not an array', 613 => 'One or more method records are corrupt or otherwise unusable', 620 => 'Method does not exist', 621 => 'Error instantiating class to invoke method', 622 => 'Method missing implementation', 623 => 'Calling parameters do not match signature', 630 => 'Unable to read request', 631 => 'Failed to parse request', 632 => 'Invalid request, no method passed; request must contain a \'methodName\' tag', 633 => 'Param must contain a value', 634 => 'Invalid method name', 635 => 'Invalid XML provided to request', 636 => 'Error creating xmlrpc value', 640 => 'Method does not exist', 650 => 'Invalid XML provided for response', 651 => 'Failed to parse response', 652 => 'Invalid response', 653 => 'Invalid XMLRPC value in response')Details
Type
array
>VPropertyprotectedstring $_message
Fault message
Details
Type
string

Methods

methodpublic__construct( $code = 404,  $message = '') : \Zend_XmlRpc_Fault

Constructor

Parameters
NameTypeDescription
$code
$message
Returns
TypeDescription
\Zend_XmlRpc_Fault
methodpublic__toString() : string

Return XML fault response

Returns
TypeDescription
string
methodpublicgetCode() : int

Return fault code

Returns
TypeDescription
int
methodpublicgetEncoding() : string

Retrieve current fault encoding

Returns
TypeDescription
string
methodpublicgetMessage() : string

Retrieve fault message

Returns
TypeDescription
string
methodpublicisFault(string $xml) : boolean
static

Determine if an XML response is an XMLRPC fault

Parameters
NameTypeDescription
$xmlstring
Returns
TypeDescription
boolean
methodpublicloadXml(string $fault) : boolean

Load an XMLRPC fault from XML

Parameters
NameTypeDescription
$faultstring
Returns
TypeDescription
booleanReturns true if successfully loaded fault response, false if response was not a fault response
Throws
ExceptionDescription
\Zend_XmlRpc_Exceptionif no or faulty XML provided, or if fault response does not contain either code or message
methodpublicsaveXml() : string

Serialize fault to XML

Returns
TypeDescription
string
methodpublicsetCode(int $code) : \Zend_XmlRpc_Fault

Set the fault code

Parameters
NameTypeDescription
$codeint
Returns
TypeDescription
\Zend_XmlRpc_Fault
methodpublicsetEncoding(string $encoding) : \Zend_XmlRpc_Fault

Set encoding to use in fault response

Parameters
NameTypeDescription
$encodingstring
Returns
TypeDescription
\Zend_XmlRpc_Fault
methodpublicsetMessage( $message) : \Zend_XmlRpc_Fault

Retrieve fault message

Parameters
NameTypeDescription
$message
Returns
TypeDescription
\Zend_XmlRpc_Fault
Documentation was generated by phpDocumentor 2.2.0 .