API Documentation

Zend/XmlRpc/Fault.php

Show: inherited
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 license@zend.com so we can send you a copy immediately.

Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_XmlRpc  
Subpackage
Server  
Version
$Id: Fault.php 24594 2012-01-05 21:27:01Z matthew $  

\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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedint  $_code= ''

Fault code

Details
Type
int
Propertyprotectedstring  $_encoding= ''UTF-8''

Fault character encoding

Default value'UTF-8'Details
Type
string
Propertyprotectedarray  $_internal= 'array( 404 => 'Unknown Error''

Internal fault codes => messages

Default valuearray( 404 => 'Unknown Error'Details
Type
array
Propertyprotectedstring  $_message= ''

Fault message

Details
Type
string

Methods

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

Constructor

Parameters
Name Type Description
$code
$message
Returns
Type Description
\Zend_XmlRpc_Fault
methodpublic__toString( ) : string

Return XML fault response

Returns
Type Description
string
methodpublicgetCode( ) : int

Return fault code

Returns
Type Description
int
methodpublicgetEncoding( ) : string

Retrieve current fault encoding

Returns
Type Description
string
methodpublicgetMessage( ) : string

Retrieve fault message

Returns
Type Description
string
methodpublicisFault( string $xml ) : boolean
static

Determine if an XML response is an XMLRPC fault

Parameters
Name Type Description
$xml string
Returns
Type Description
boolean
methodpublicloadXml( string $fault ) : boolean

Load an XMLRPC fault from XML

Parameters
Name Type Description
$fault string
Returns
Type Description
boolean Returns true if successfully loaded fault response, false if response was not a fault response
Throws
Exception Description
\Zend_XmlRpc_Exception if no or faulty XML provided, or if fault response does not contain either code or message
methodpublicsaveXml( ) : string

Serialize fault to XML

Returns
Type Description
string
methodpublicsetCode( int $code ) : \Zend_XmlRpc_Fault

Set the fault code

Parameters
Name Type Description
$code int
Returns
Type Description
\Zend_XmlRpc_Fault
methodpublicsetEncoding( string $encoding ) : \Zend_XmlRpc_Fault

Set encoding to use in fault response

Parameters
Name Type Description
$encoding string
Returns
Type Description
\Zend_XmlRpc_Fault
methodpublicsetMessage(  $message ) : \Zend_XmlRpc_Fault

Retrieve fault message

Parameters
Name Type Description
$message

string

Returns
Type Description
\Zend_XmlRpc_Fault
Documentation was generated by DocBlox 0.15.1.