Class Amfphp_Core_Amf_Handler

Description

Implements interfaces:

This is the default handler for the gateway. It's job is to handle everything that is specific to Amf for the gateway.

  • author: Ariel Sommeria-Klein

Located in /Amfphp/Core/Amf/Handler.php (line 18)


	
			
Class Constant Summary
 FILTER_AMF_EXCEPTION_HANDLER = 'FILTER_AMF_EXCEPTION_HANDLER'
 FILTER_AMF_REQUEST_HEADER_HANDLER = 'FILTER_AMF_REQUEST_HEADER_HANDLER'
 FILTER_AMF_REQUEST_MESSAGE_HANDLER = 'FILTER_AMF_REQUEST_MESSAGE_HANDLER'
Variable Summary
Method Summary
Amfphp_Core_Amf_Handler __construct ( $sharedConfig)
void deserialize ( $getData,  $postData,  $rawPostData)
void handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
void handleException ( $exception)
void serialize ( $data)
Variables
static type $additionnalResponseHeaders = null (line 60)

set this if you need additional headers in the response. They will be added after normal treatment

  • var: array of Amfphp_Core_Amf_Header
  • access: public
static array $additionnalResponseMessages = null (line 65)

set this if you need additional messages in the response. They will be added after normal treatment

  • var: of Amfphp_Core_Amf_Message
  • access: public
String $lastRequestMessageResponseUri (line 51)

Amf specifies that an error message must be aimed at an end point. This stores the last message's response Uri to be able to give this end point

in case of an exception during the handling of the message. The default is '/1', because a response Uri is not always available

  • access: protected
mixed $objectEncoding = Amfphp_Core_Amf_Constants::AMF0_ENCODING (line 52)
  • access: protected
mixed $returnErrorDetails = false (line 54)
  • access: protected
Methods
Constructor __construct (line 68)
  • access: public
Amfphp_Core_Amf_Handler __construct ( $sharedConfig)
  • $sharedConfig
deserialize (line 76)
void deserialize ( $getData,  $postData,  $rawPostData)
  • array $getData
  • array $postData
  • $rawPostData
getServiceCallParameters (line 91)

creates a ServiceCallParamaeters object from an Amfphp_Core_Amf_Message

supported separators in the targetUri are '/' and '.'

  • access: protected
Amfphp_Core_Common_ServiceCallParameters getServiceCallParameters (Amfphp_Core_Amf_Message $Amfphp_Core_Amf_Message)
handleDeserializedRequest (line 130)
void handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
handleException (line 168)
void handleException ( $exception)
  • Exception $exception
handleRequestMessage (line 108)

process a request and generate a response.

throws an Exception if anything fails, so caller must encapsulate in try/catch

  • return: the response Message for the request
  • access: protected
Amfphp_Core_Amf_Message handleRequestMessage (Amfphp_Core_Amf_Message $requestMessage,  $serviceRouter)
serialize (line 201)
void serialize ( $data)
  • $data
Class Constants
FILTER_AMF_EXCEPTION_HANDLER = 'FILTER_AMF_EXCEPTION_HANDLER' (line 44)

filter called for exception handling an Amf packet/message, to give a plugin the chance to handle it.

This is for the Flex Messaging plugin to be able to intercept the exception and say it wants to handle it

  • todo: consider an interface for $handler. Maybe overkill here
FILTER_AMF_REQUEST_HEADER_HANDLER = 'FILTER_AMF_REQUEST_HEADER_HANDLER' (line 27)

filter called for each amf request header, to give a plugin the chance to handle it.

Unless a plugin handles them, amf headers are ignored Headers embedded in the serialized requests are regarded to be a Amf specific, so they get their filter in Amf Handler

  • todo: consider an interface for $handler. Maybe overkill here
FILTER_AMF_REQUEST_MESSAGE_HANDLER = 'FILTER_AMF_REQUEST_MESSAGE_HANDLER' (line 36)

filter called for each amf request message, to give a plugin the chance to handle it.

This is for the Flex Messaging plugin to be able to intercept the message and say it wants to handle it

  • todo: consider an interface for $handler. Maybe overkill here

Documentation generated on Mon, 23 Jan 2012 17:22:06 -0300 by phpDocumentor 1.4.3