Class Ismo_Core_State_XMLRPC

Description

The XML-RPC base state class.

This is the class to extend from if you want to make the methods of your state accesible via XML-RPC.

A difference compared to the IsmoState class is that the action methods will be given the parameters received from the XML-RPC request.

Additional documentation is available in the IsmoWiki at http://ismo.sourceforge.net/wiki/IsmoXMLRPCState

Located in /State/XMLRPC.php (line 54)

Ismo_Core_State_HTTP
   |
   --Ismo_Core_State_XMLRPC
Variable Summary
XMLRPC_Request $_xmlrpcRequest
Method Summary
Ismo_Core_State_XMLRPC Ismo_Core_State_XMLRPC ()
void execute ()
void _deduceAction ()
void _methodMissing (string $name, array $params)
void _sendError ($code $code, $message $message)
void _sendResponse (mixed $returnValue, [string $type = null])
Variables
Methods
Constructor Ismo_Core_State_XMLRPC (line 161)

The constructor.

  • access: public
Ismo_Core_State_XMLRPC Ismo_Core_State_XMLRPC ()
execute (line 178)

Handles the request.

This is done by first figuring out which action method that should be called and then calling it.

  • access: public
void execute ()

Redefinition of:
Ismo_Core_State_HTTP::execute()
Handles the request.
_deduceAction (line 77)

Figures out which action method that should be called.

XML-RPC methods usually contains a dot, like blogger.getRecentPosts but dots are not valid in method names. So all dots will be changed into underscores. So blogger.getRecentPosts will be changed into blogger_getRecentPosts and the exec_blogger_getRecentPosts() method will later be called. Colons (:) and slashes (/) will also be changed into underscores.

  • access: private
void _deduceAction ()

Redefinition of:
Ismo_Core_State_HTTP::_deduceAction()
Figures out which action method that should be called.
_methodMissing (line 104)

Missing action method saver.

This method is called whenever an action with doesn't have a corresponding exec... method is requested. The default implementation of this method sends an error message says that the requested method doesn't exist. Override this method in your state classes if you want some other behaviour.

  • access: private
void _methodMissing (string $name, array $params)
  • string $name: the requested action's name
  • array $params: the parameters given in the call
_sendError (line 119)

Sends an XML-RPC error message.

  • access: private
void _sendError ($code $code, $message $message)
  • $code $code: the error code
  • $message $message: the error message
_sendResponse (line 147)

Sends back a response to the received XML-RPC request.

An XML-RPC response can only contain one value but that value might be an array or a struct so it's possible to return more complicated structures.

  • access: private
void _sendResponse (mixed $returnValue, [string $type = null])
  • mixed $returnValue: the value or values to send back. These will automatically be transformed into the appropriate data structure to be serialized into an XML-RPC message
  • string $type: most of the time the type of the $returnValue parameter can be determined with PHP's reflection but in some cases one might want to specify it manually

Inherited Methods

Inherited From Ismo_Core_State_HTTP

Ismo_Core_State_HTTP::Ismo_Core_State_HTTP()
Ismo_Core_State_HTTP::execDefault()
Ismo_Core_State_HTTP::execute()
Ismo_Core_State_HTTP::postExec()
Ismo_Core_State_HTTP::postShow()
Ismo_Core_State_HTTP::preExec()
Ismo_Core_State_HTTP::preShow()
Ismo_Core_State_HTTP::setConfiguration()
Ismo_Core_State_HTTP::setLogger()
Ismo_Core_State_HTTP::setRequest()
Ismo_Core_State_HTTP::setResponse()
Ismo_Core_State_HTTP::setSession()
Ismo_Core_State_HTTP::setStateName()
Ismo_Core_State_HTTP::setUrlStyle()
Ismo_Core_State_HTTP::_actionMethodMissing()
Ismo_Core_State_HTTP::_authorize()
Ismo_Core_State_HTTP::_createActionMethodName()
Ismo_Core_State_HTTP::_createNewSession()
Ismo_Core_State_HTTP::_createShowMethodName()
Ismo_Core_State_HTTP::_deduceAction()
Ismo_Core_State_HTTP::_deduceLocale()
Ismo_Core_State_HTTP::_exposeDefaultVariables()
Ismo_Core_State_HTTP::_getUrl()
Ismo_Core_State_HTTP::_hasSession()
Ismo_Core_State_HTTP::_log()
Ismo_Core_State_HTTP::_recover()
Ismo_Core_State_HTTP::_recurseShow()
Ismo_Core_State_HTTP::_showMethodMissing()

Documentation generated on Mon, 14 Jun 2004 11:59:42 +0200 by phpDocumentor 1.3.0RC3