\Amfphp_Core_Amf_Handler

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

Summary

Methods
Properties
Constants
__construct()
deserialize()
handleDeserializedRequest()
handleException()
serialize()
$requestPacket
$responsePacket
FILTER_AMF_REQUEST_HEADER_HANDLER
FILTER_AMF_REQUEST_MESSAGE_HANDLER
FILTER_AMF_EXCEPTION_HANDLER
getServiceCallParameters()
handleRequestMessage()
$lastRequestMessageResponseUri
$returnErrorDetails
$voConverter
N/A
No private methods found
No private properties found
N/A

Constants

FILTER_AMF_REQUEST_HEADER_HANDLER

FILTER_AMF_REQUEST_HEADER_HANDLER

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

FILTER_AMF_REQUEST_MESSAGE_HANDLER

FILTER_AMF_REQUEST_MESSAGE_HANDLER

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

FILTER_AMF_EXCEPTION_HANDLER

FILTER_AMF_EXCEPTION_HANDLER

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

Properties

$requestPacket

$requestPacket : \Amfphp_Core_Amf_Packet

use this to manipulate the packet directly from your services. This is an advanced option, and should be used with caution!

Type

\Amfphp_Core_Amf_Packet

$responsePacket

$responsePacket : \Amfphp_Core_Amf_Packet

use this to manipulate the packet directly from your services. This is an advanced option, and should be used with caution!

Type

\Amfphp_Core_Amf_Packet

$lastRequestMessageResponseUri

$lastRequestMessageResponseUri : String

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

Type

String

$returnErrorDetails

$returnErrorDetails : boolean

return error details

Type

boolean

Methods

__construct()

__construct(array $sharedConfig)

constructor

Parameters

array $sharedConfig

deserialize()

deserialize(array $getData, array $postData, string $rawPostData) : string

deserialize

Parameters

array $getData
array $postData
string $rawPostData

Returns

string

handleDeserializedRequest()

handleDeserializedRequest(mixed $deserializedRequest, \Amfphp_Core_Common_ServiceRouter $serviceRouter) : mixed

handle deserialized request

Parameters

mixed $deserializedRequest
\Amfphp_Core_Common_ServiceRouter $serviceRouter

Returns

mixed

handleException()

handleException(\Exception $exception) : \Amfphp_Core_Amf_Packet

handle exception

Parameters

\Exception $exception

Returns

\Amfphp_Core_Amf_Packet

serialize()

serialize(mixed $data) : mixed

serialize

Parameters

mixed $data

Returns

mixed

getServiceCallParameters()

getServiceCallParameters(\Amfphp_Core_Amf_Message $Amfphp_Core_Amf_Message) : \Amfphp_Core_Common_ServiceCallParameters

creates a ServiceCallParameters object from an Amfphp_Core_Amf_Message supported separators in the targetUri are '/' and '.'

Parameters

\Amfphp_Core_Amf_Message $Amfphp_Core_Amf_Message

Returns

\Amfphp_Core_Common_ServiceCallParameters

handleRequestMessage()

handleRequestMessage(\Amfphp_Core_Amf_Message $requestMessage, \Amfphp_Core_Common_ServiceRouter $serviceRouter) : \Amfphp_Core_Amf_Message

process a request and generate a response.

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

Parameters

\Amfphp_Core_Amf_Message $requestMessage
\Amfphp_Core_Common_ServiceRouter $serviceRouter

Returns

\Amfphp_Core_Amf_Message

the response Message for the request