Class AmfphpServiceBrowser

Description

Implements interfaces:

A simple service browser with html only. Sometimes you don't need the full thing with AMF etc., so use this This plugin should be deactivated on a production server.

call the gateway with the following GET parameters: serviceName: the service name methodName : the method to call on the service

pass the parameters as POST data. Each will be JSON decoded to be able to pass complex parameters. This requires PHP 5.2 or higher

  • author: Ariel Sommeria-Klein, Daniel Hoffmann (intermedi8.de)

Located in /Amfphp/Plugins/AmfphpServiceBrowser/AmfphpServiceBrowser.php (line 26)


	
			
Class Constant Summary
 CONTENT_TYPE = "application/x-www-form-urlencoded"
Variable Summary
Method Summary
AmfphpServiceBrowser __construct ([ $config = null])
void deserialize ( $getData,  $postData,  $rawPostData)
this filterHandler (mixed $handler, String $contentType)
array filterHeaders (array $headers,  $contentType)
array getAvailableServiceNames ( $serviceFolderPaths,  $serviceNames2ClassFindInfo)
void handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
void handleException ( $exception)
type searchFolderForServices (type $rootPath, type $subFolder)
void serialize ( $data)
Variables
mixed $callDurationMs (line 50)
  • access: protected
mixed $callStartTimeMs (line 49)
  • access: protected
mixed $methodName (line 33)
  • access: protected
array $parameters (line 39)

used for service call

  • access: protected
array $parametersAssoc (line 46)

associative array of parameters. Used to set the parameters input fields to the same values again after a call.

note: stored encoded because that's the way we need them to show them in the dialog

  • access: protected
mixed $returnErrorDetails = false (line 51)
  • access: protected
mixed $serviceName (line 32)
  • access: protected
mixed $serviceRouter (line 47)
  • access: protected
mixed $showResult (line 48)
  • access: protected
Methods
Constructor __construct (line 57)

constructor.

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

if no content type, then returns this.

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

filter the headers to make sure the content type is set to text/html if the request was handled by the service browser

  • access: public
array filterHeaders (array $headers,  $contentType)
  • array $headers
  • $contentType
getAvailableServiceNames (line 119)

returns a list of available services

  • return: of service names
  • access: protected
array getAvailableServiceNames ( $serviceFolderPaths,  $serviceNames2ClassFindInfo)
  • array $serviceFolderPaths
  • array $serviceNames2ClassFindInfo
handleDeserializedRequest (line 135)
void handleDeserializedRequest ( $deserializedRequest,  $serviceRouter)
handleException (line 187)
void handleException ( $exception)
  • Exception $exception
searchFolderForServices (line 96)

finds classes in folder. If in subfolders add the relative path to the name.

recursive, so use with care.

  • access: protected
type searchFolderForServices (type $rootPath, type $subFolder)
  • type $rootPath
  • type $subFolder
serialize (line 204)
void serialize ( $data)
  • $data
Class Constants
CONTENT_TYPE = "application/x-www-form-urlencoded" (line 30)

if content type is not set or content is set to "application/x-www-form-urlencoded", this plugin will handle the request

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