This is the default handler for the gateway.
It's job is to handle everything that is specific to Amf for the gateway.
todo | determine if indirection for serializer/deserializer necessary. Makes gateway code lighter, but is cumbersome |
---|---|
package | Amfphp_Core_Amf |
author | Ariel Sommeria-Klein |
__construct(array $sharedConfig)
array
deserialize(array $getData, array $postData, string $rawPostData) : string
see | \Amfphp_Core_Common_IDeserializer |
---|
array
array
string
string
handleDeserializedRequest(mixed $deserializedRequest, \Amfphp_Core_Common_ServiceRouter $serviceRouter) : mixed
This should not handle exceptions, as this is done separately
see | \Amfphp_Core_Common_IDeserializedRequestHandler |
---|
mixed
\Amfphp_Core_Common_ServiceRouter
mixed
handleException(\Exception $exception) : \Amfphp_Core_Amf_Packet
serialize(mixed $data) : mixed
The return type is noted as a String, but is a binary stream. echo it to the output buffer
see | \Amfphp_Core_Common_ISerializer |
---|
mixed
mixed
getServiceCallParameters(\Amfphp_Core_Amf_Message $Amfphp_Core_Amf_Message) : \Amfphp_Core_Common_ServiceCallParameters
handleRequestMessage(\Amfphp_Core_Amf_Message $requestMessage, \Amfphp_Core_Common_ServiceRouter $serviceRouter) : \Amfphp_Core_Amf_Message
throws an Exception if anything fails, so caller must encapsulate in try/catch
\Amfphp_Core_Amf_Message
\Amfphp_Core_Common_ServiceRouter
\Amfphp_Core_Amf_Message
the response Message for the request$requestPacket : \Amfphp_Core_Amf_Packet
This is an advanced option, and should be used with caution!
$responsePacket : \Amfphp_Core_Amf_Packet
This is an advanced option, and should be used with caution!
$lastRequestMessageResponseUri : String
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
$returnErrorDetails : boolean
FILTER_AMF_EXCEPTION_HANDLER
This is for the Flex Messaging plugin to be able to intercept the exception and say it wants to handle it
param | null at call. Return if the plugin can handle |
---|---|
todo | consider an interface for $handler. Maybe overkill here |
FILTER_AMF_REQUEST_HEADER_HANDLER
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
param | null at call. Return if the plugin can handle |
---|---|
param | the request header |
todo | consider an interface for $handler. Maybe overkill here |
FILTER_AMF_REQUEST_MESSAGE_HANDLER
This is for the Flex Messaging plugin to be able to intercept the message and say it wants to handle it
param | null at call. Return if the plugin can handle |
---|---|
param | the request message |
todo | consider an interface for $handler. Maybe overkill here |