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

link http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_4.html
package Amfphp_Plugins_FlexMessaging
author Ariel Sommeria-Klein

 Methods

constructor.

__construct(array $config) 

Parameters

$config

array

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

filter amf exception handler

filterAmfExceptionHandler(Object $handler) : array

Parameters

$handler

Object

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

filter amf request message handler

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

Parameters

$handler

Object

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.

$requestMessage

\Amfphp_Core_Amf_Message

the request message

Returns

array

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

generateErrorResponse(\Exception $exception) : \Amfphp_Core_Amf_Packet

Parameters

$exception

\Exception

Returns

handle the request message instead of letting the Amf Handler do it.

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

Parameters

$requestMessage

\Amfphp_Core_Amf_Message

Returns

 Properties

 

$clientUsesFlexMessaging : Boolean
 

$lastFlexMessageId : String

Used for error generation

 

$lastFlexMessageResponseUri : String

Used for error generation

 

$returnErrorDetails : boolean

 Constants

 

FIELD_MESSAGE_ID

FIELD_MESSAGE_ID 
 

FLEX_TYPE_ACKNOWLEDGE_MESSAGE

FLEX_TYPE_ACKNOWLEDGE_MESSAGE 
 

FLEX_TYPE_COMMAND_MESSAGE

FLEX_TYPE_COMMAND_MESSAGE 
 

FLEX_TYPE_ERROR_MESSAGE

FLEX_TYPE_ERROR_MESSAGE 
 

FLEX_TYPE_REMOTING_MESSAGE

FLEX_TYPE_REMOTING_MESSAGE