Class AmfphpJson

Description

Implements interfaces:

plugin allowing service calls coming from JavaScript encoded as JSON strings and returned as JSON strings using POST parameters.

Requires at least PHP 5.2.

  • author: Yannick DOMINGUEZ

Located in /Amfphp/Plugins/AmfphpJson/AmfphpJson.php (line 20)


	
			
Class Constant Summary
Method Summary
AmfphpJson __construct ([ $config = null])
void deserialize ( $getData,  $postData,  $rawPostData)
this filterHandler (mixed $handler, String $contentType)
the handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
void handleException ( $exception)
the serialize ( $data)
Methods
Constructor __construct (line 31)

constructor. Add filters on the HookManager.

  • access: public
AmfphpJson __construct ([ $config = null])
  • array $config: optional key/value pairs in an associative array. Used to override default configuration values.
deserialize (line 54)
void deserialize ( $getData,  $postData,  $rawPostData)
  • array $getData
  • array $postData
  • $rawPostData
filterHandler (line 45)

If the content type contains the "json" string, returns this plugin

  • return: or null
  • access: public
this filterHandler (mixed $handler, String $contentType)
  • String $contentType
  • mixed $handler: null at call in gateway.
handleDeserializedRequest (line 64)

Retrieve the serviceName, methodName and parameters from the PHP object

representing the JSON string

the handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
handleException (line 88)
void handleException ( $exception)
  • Exception $exception
serialize (line 98)

Encode the PHP object returned from the service call into a JSON string

the serialize ( $data)
  • $data
Class Constants
JSON_CONTENT_TYPE = "json" (line 25)

the content-type string indicating a JSON content

Documentation generated on Thu, 24 Mar 2011 16:55:38 +0100 by phpDocumentor 1.4.3