Class AmfphpFlexMessaging

Description

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

Located in /Amfphp/Plugins/AmfphpFlexMessaging/AmfphpFlexMessaging.php (line 32)


	
			
Class Constant Summary
 FIELD_MESSAGE_ID = 'messageId'
 FLEX_TYPE_ACKNOWLEDGE_MESSAGE = 'flex.messaging.messages.AcknowledgeMessage'
 FLEX_TYPE_COMMAND_MESSAGE = 'flex.messaging.messages.CommandMessage'
 FLEX_TYPE_ERROR_MESSAGE = 'flex.messaging.messages.ErrorMessage'
 FLEX_TYPE_REMOTING_MESSAGE = 'flex.messaging.messages.RemotingMessage'
Variable Summary
Method Summary
AmfphpFlexMessaging __construct ([ $config = null])
array filterAmfExceptionHandler ( $handler, Object $handler.)
array filterAmfRequestMessageHandler ( $handler,  $requestMessage, Object $handler.)
Amfphp_Core_Amf_Message handleRequestMessage ( $requestMessage,  $serviceRouter)
Variables
Boolean $clientUsesFlexMessaging (line 44)

if this is set, special error handling applies

  • access: protected
String $lastFlexMessageId (line 50)

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

  • access: protected
String $lastFlexMessageResponseUri (line 56)

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

  • access: protected
mixed $returnErrorDetails = false (line 58)
  • access: protected
Methods
Constructor __construct (line 63)

constructor.

  • access: public
AmfphpFlexMessaging __construct ([ $config = null])
  • array $config: optional key/value pairs in an associative array. Used to override default configuration values.
filterAmfExceptionHandler (line 105)
  • access: public
array filterAmfExceptionHandler ( $handler, Object $handler.)
  • 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.
  • $handler
filterAmfRequestMessageHandler (line 78)
  • access: public
array filterAmfRequestMessageHandler ( $handler,  $requestMessage, Object $handler.)
  • 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
  • $handler
generateErrorResponse (line 150)

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

  • access: public
Amfphp_Core_Amf_Packet generateErrorResponse ( $exception)
  • Exception $exception
handleRequestMessage (line 117)

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

  • access: public
Amfphp_Core_Amf_Message handleRequestMessage ( $requestMessage,  $serviceRouter)
Class Constants
FIELD_MESSAGE_ID = 'messageId' (line 38)
FLEX_TYPE_ACKNOWLEDGE_MESSAGE = 'flex.messaging.messages.AcknowledgeMessage' (line 35)
FLEX_TYPE_COMMAND_MESSAGE = 'flex.messaging.messages.CommandMessage' (line 33)
FLEX_TYPE_ERROR_MESSAGE = 'flex.messaging.messages.ErrorMessage' (line 36)
FLEX_TYPE_REMOTING_MESSAGE = 'flex.messaging.messages.RemotingMessage' (line 34)

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