Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
An AMF gateway server implementation to allow the connection of the Adobe Flash Player to Zend Framework
Zend_Acl $_acl = ''
ACL handler object
Zend_Amf_Auth_Abstract $_auth = ''
Authentication handler object
array $_classAllowed = 'array'
Array of classes that can be called without being explicitly loaded
Keys are class names.
Zend_Loader_PluginLoader $_loader = ''
Loader for classes in added directories
array $_methods = 'array'
Array of dispatchables
bool $_production = 'true'
null|Zend_Amf_Request $_request = 'null'
Request processed
null|Zend_Amf_Response $_response = ''
Class to use for responses
Zend_Session_NameSpace $_sesionNamespace = 'zend_amf'
Namespace allows all AMF calls to not clobber other php session variables
bool $_session = 'false'
string $_sessionName = 'PHPSESSID'
Set the default session.name if php_
array $_table = 'array'
Dispatch table of name => method pairs
__construct(
)
:
The server constructor
_buildDispatchTable(
)
:
void
(Re)Build the dispatch table
The dispatch table consists of a an array of method name => Zend_Server_Reflection_Function_Abstract pairs
_checkAcl(
string|object $object, string $function
)
:
unknown_type
Check if the ACL allows accessing the function or method
_dispatch(
string $method, $params
=
null, $source
=
null
)
:
mixed
Loads a remote class or method and executes the function and returns the result
_errorMessage(
int $objectEncoding, string $message, string $description, mixed $detail, int $code, int $line
)
:
Zend_Amf_Value_Messaging_ErrorMessage|array
Create appropriate error message
_handle(
Zend_Amf_Request $request
)
:
Zend_Amf_Response
Takes the deserialized AMF request and performs any operations.
_handleAuth(
string $userid, string $password
)
:
boolean
Handle AMF authentication
_loadCommandMessage(
Zend_Amf_Value_Messaging_CommandMessage $message
)
:
Zend_Amf_Value_Messaging_AcknowledgeMessage
Handles each of the 11 different command message types.
A command message is a flex.messaging.messages.CommandMessage
addDirectory(
string $dir
)
:
Creates an array of directories in which services can reside.
TODO: add support for prefixes?
addFunction(
string|array $function, string $namespace
)
:
Zend_Amf_Server
Attach a function to the server
Additional arguments to pass to the function at dispatch may be passed; any arguments following the namespace will be aggregated and passed at dispatch time.
fault(
string|Exception $fault
=
null, $code
=
404
)
:
void
Raise a server fault
Unimplemented
getAuth(
)
:
Zend_Amf_Auth_Abstract
Get authentication adapter
getDirectory(
)
:
array
Returns an array of directories that can hold services.
getFunctions(
)
:
array
Returns a list of registered methods
Returns an array of dispatchables (Zend_Server_Reflection_Function, _Method, and _Class items).
getLoader(
)
:
Zend_Loader_PluginLoader
Get PluginLoader for the Server
getRequest(
)
:
null|Zend_Amf_Request
Return currently registered request object
getResponse(
)
:
Zend_Amf_Server_Response
get a reference to the Zend_Amf_response instance
handle(
null|Zend_Amf_Request $request
=
null
)
:
Zend_Amf_Response
Handle an AMF call from the gateway.
isProduction(
)
:
bool
Whether or not the server is in production
isSession(
)
:
bool
Whether of not the server is using sessions
listMethods(
)
:
array
List all available methods
Returns an array of method names.
loadFunctions(
array $definition
)
:
void
Load server definition
Unimplemented
setAcl(
Zend_Acl $acl
)
:
Zend_Amf_Server
Set ACL adapter
setAuth(
Zend_Amf_Auth_Abstract $auth
)
:
Zend_Amf_Server
Set authentication adapter
setClass(
string|object $class, string $namespace, $argv
=
null
)
:
Zend_Amf_Server
Attach a class or object to the server
Class may be either a class name or an instantiated object. Reflection is done on the class or object to determine the available public methods, and each is attached to the server as and available method. If a $namespace has been provided, that namespace is used to prefix AMF service call.
setClassMap(
string $asClass, string $phpClass
)
:
Zend_Amf_Server
Map ActionScript classes to PHP classes
setPersistence(
mixed $mode
)
:
void
Set server persistence
Unimplemented
setProduction(
bool $flag
)
:
Zend_Amf_Server
Set production flag
setRequest(
string|Zend_Amf_Request $request
)
:
Zend_Amf_Server
Set request object
setResponse(
string|Zend_Amf_Server_Response $response
)
:
Zend_Amf_Server
Public access method to private Zend_Amf_Server_Response reference
setSession(
default $namespace
=
Zend_Amf
)
:
Zend_Amf_Server