API Documentation

Zend/XmlRpc/Server/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.

Category
Zend  
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_Server_Fault

Package: Zend\XmlRpc\Server

XMLRPC Server Faults

Encapsulates an exception for use as an XMLRPC fault response. Valid exception classes that may be used for generating the fault code and fault string can be attached using {@link attachFaultException()}; all others use a generic '404 Unknown error' response.

You may also attach fault observers, which would allow you to monitor particular fault cases; this is done via {@link attachObserver()}. Observers need only implement a static 'observe' method.

To allow method chaining, you may use the {@link getInstance()} factory to instantiate a Zend_XmlRpc_Server_Fault.

Parent(s)
\Zend_XmlRpc_Fault
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Exception  $_exception= ''

Details
Type
\Exception
Propertyprotectedarray  $_faultExceptionClasses= 'array('Zend_XmlRpc_Server_Exception' => true)'
static

Array of exception classes that may define xmlrpc faults
Default valuearray('Zend_XmlRpc_Server_Exception' => true)Details
Type
array
Propertyprotectedarray  $_observers= 'array()'
static

Array of fault observers
Default valuearray()Details
Type
array

Methods

methodpublic__construct( \Exception $e ) : \Zend_XmlRpc_Server_Fault

Constructor

Parameters
Name Type Description
$e \Exception
Returns
Type Description
\Zend_XmlRpc_Server_Fault
methodpublicattachFaultException( string|array $classes ) : void
static

Attach valid exceptions that can be used to define xmlrpc faults

Parameters
Name Type Description
$classes string|array

Class name or array of class names

methodpublicattachObserver( string $class ) : boolean
static

Attach an observer class

Allows observation of xmlrpc server faults, thus allowing logging or mail notification of fault responses on the xmlrpc server.

Expects a valid class name; that class must have a public static method 'observe' that accepts an exception as its sole argument.

Parameters
Name Type Description
$class string
Returns
Type Description
boolean
methodpublicdetachFaultException( string|array $classes ) : void
static

Detach fault exception classes

Parameters
Name Type Description
$classes string|array

Class name or array of class names

methodpublicdetachObserver( string $class ) : boolean
static

Detach an observer

Parameters
Name Type Description
$class string
Returns
Type Description
boolean
methodpublicgetException( ) : \Exception

Retrieve the exception

Returns
Type Description
\Exception
Details
Access
public  
methodpublicgetInstance( \Exception $e ) : \Zend_XmlRpc_Server_Fault
static

Return Zend_XmlRpc_Server_Fault instance

Parameters
Name Type Description
$e \Exception
Returns
Type Description
\Zend_XmlRpc_Server_Fault
Documentation was generated by DocBlox 0.15.1.