\AmfphpFlexMessaging

Support for flex messaging.

This plugin can be deactivated if the project doesn't need flex messaging, usually a RemoteObject in Flex.

Flex doesn't use the basic packet system. When using a remote objct, first a CommandMessage is sent, expecting an AcknowledgeMessage in return. Then a RemotingMessage is sent, expecting an AcknowledgeMessage in return. This plugin adds support for this message flow.

In case of an error, an ErrorMessage is expected

Summary

Methods
Properties
Constants
__construct()
filterAmfRequestMessageHandler()
filterAmfExceptionHandler()
handleRequestMessage()
generateErrorResponse()
No public properties found
FLEX_TYPE_COMMAND_MESSAGE
FLEX_TYPE_REMOTING_MESSAGE
FLEX_TYPE_ACKNOWLEDGE_MESSAGE
FLEX_TYPE_ERROR_MESSAGE
FIELD_MESSAGE_ID
No protected methods found
$clientUsesFlexMessaging
$lastFlexMessageId
$lastFlexMessageResponseUri
$returnErrorDetails
N/A
No private methods found
No private properties found
N/A

Constants

FLEX_TYPE_COMMAND_MESSAGE

FLEX_TYPE_COMMAND_MESSAGE

FLEX_TYPE_REMOTING_MESSAGE

FLEX_TYPE_REMOTING_MESSAGE

FLEX_TYPE_ACKNOWLEDGE_MESSAGE

FLEX_TYPE_ACKNOWLEDGE_MESSAGE

FLEX_TYPE_ERROR_MESSAGE

FLEX_TYPE_ERROR_MESSAGE

FIELD_MESSAGE_ID

FIELD_MESSAGE_ID

Properties

$clientUsesFlexMessaging

$clientUsesFlexMessaging : Boolean

if this is set, special error handling applies

Type

Boolean

$lastFlexMessageId

$lastFlexMessageId : String

the messageId of the last flex message. Used for error generation

Type

String

$lastFlexMessageResponseUri

$lastFlexMessageResponseUri : String

the response uri of the last flex message. Used for error generation

Type

String

$returnErrorDetails

$returnErrorDetails : boolean

return error details.

Type

boolean

Methods

__construct()

__construct(array $config)

constructor.

Parameters

array $config

optional key/value pairs in an associative array. Used to override default configuration values.

filterAmfRequestMessageHandler()

filterAmfRequestMessageHandler(Object $handler, \Amfphp_Core_Amf_Message $requestMessage) : array

filter amf request message handler

Parameters

Object $handler

null at call. If the plugin takes over the handling of the request message, it must set this to a proper handler for the message, probably itself.

\Amfphp_Core_Amf_Message $requestMessage

the request message

Returns

array

filterAmfExceptionHandler()

filterAmfExceptionHandler(Object $handler) : array

filter amf exception handler

Parameters

Object $handler

null at call. If the plugin takes over the handling of the request message, it must set this to a proper handler for the message, probably itself.

Returns

array

generateErrorResponse()

generateErrorResponse(\Exception $exception) : \Amfphp_Core_Amf_Packet

flex expects error messages formatted in a special way, using the ErrorMessage object.

Parameters

\Exception $exception

Returns

\Amfphp_Core_Amf_Packet