An AMF gateway server implementation to allow the connection of the Adobe Flash Player to Zend Framework
todo | Make the reflection methods cache and autoload. |
---|---|
package | Zend_Amf |
subpackage | Server |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct()
addDirectory(string $dir)
TODO: add support for prefixes?
string
addFunction(string|array $function, string $namespace = ''
) : \Zend_Amf_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.
inherited_from | \Zend_Server_Interface::addFunction() |
---|
string
array
Valid callback
string
Optional namespace prefix
\Zend_Amf_Server_Exception |
---|
\Zend_Amf_Server
fault(string|\Exception $fault= null
, integer $code= 404
) : void
Unimplemented
inherited_from | \Zend_Server_Interface::fault() |
---|
string
\Exception
getAcl() : \Zend_Acl
\Zend_Acl
getAuth() : \Zend_Amf_Auth_Abstract
\Zend_Amf_Auth_Abstract
getDirectory() : array
array
getFunctions() : array
Returns an array of dispatchables (Zend_Server_Reflection_Function, _Method, and _Class items).
inherited_from | \Zend_Server_Interface::getFunctions() |
---|
array
getRequest() : null | \Zend_Amf_Request
null
\Zend_Amf_Request
getResponse() : \Zend_Amf_Server_Response
\Zend_Amf_Server_Response
handle(null|\Zend_Amf_Request $request = null
) : \Zend_Amf_Response
Requests may be passed in, or the server may automagically determine the request based on defaults. Dispatches server request to appropriate method and returns a response
inherited_from | \Zend_Server_Interface::handle() |
---|
null
\Zend_Amf_Request
Optional
\Zend_Amf_Response
isProduction() : boolean
boolean
isSession() : boolean
boolean
listMethods() : array
Returns an array of method names.
array
loadFunctions(array $definition) : void
Unimplemented
inherited_from | \Zend_Server_Interface::loadFunctions() |
---|
array
setAcl(\Zend_Acl $acl) : \Zend_Amf_Server
\Zend_Acl
\Zend_Amf_Server
setAuth(\Zend_Amf_Auth_Abstract $auth) : \Zend_Amf_Server
If the authentication adapter implements a "getAcl()" method, populate the ACL of this instance with it (if none exists already).
\Zend_Amf_Auth_Abstract
\Zend_Amf_Server
setClass(string|object $class, string $namespace= ''
, $argv= null
) : \Zend_Amf_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.
inherited_from | \Zend_Server_Interface::setClass() |
---|
string
object
string
Optional
\Zend_Amf_Server_Exception |
on invalid input |
---|
\Zend_Amf_Server
setClassMap(string $asClass, string $phpClass) : \Zend_Amf_Server
string
string
\Zend_Amf_Server
setPersistence(mixed $mode) : void
Unimplemented
inherited_from | \Zend_Server_Interface::setPersistence() |
---|
mixed
setProduction(boolean $flag) : \Zend_Amf_Server
boolean
\Zend_Amf_Server
setRequest(string|\Zend_Amf_Request $request) : \Zend_Amf_Server
string
\Zend_Amf_Request
\Zend_Amf_Server
setResponse(string|\Zend_Amf_Server_Response $response) : \Zend_Amf_Server
string
\Zend_Amf_Server_Response
\Zend_Amf_Server
setSession($namespace = 'Zend_Amf'
) : \Zend_Amf_Server
\Zend_Amf_Server
_buildDispatchTable() : void
The dispatch table consists of a an array of method name => Zend_Server_Reflection_Function_Abstract pairs
_castParameters(\Reflection $reflectionMethod, array $params) : array
Takes the provided parameters from the request, and attempts to cast them to objects, if the prototype defines any as explicit object types
\Reflection
array
array
_checkAcl(string|object $object, string $function) : \unknown_type
string
object
Object or class being accessed
string
Function or method being accessed
\unknown_type
_dispatch(string $method, $params= null
, $source= null
) : mixed
string
Is the method to execute
\Zend_Amf_Server_Exception |
---|
mixed
$response the result of executing the method_errorMessage(integer $objectEncoding, string $message, string $description, mixed $detail, integer $code, integer $line) : \Zend_Amf_Value_Messaging_ErrorMessage | array
integer
Current AMF encoding
string
Message that was being processed when error happened
string
Error description
mixed
Detailed data about the error
integer
Error code
integer
Error line
\Zend_Amf_Value_Messaging_ErrorMessage
array
_handle(\Zend_Amf_Request $request) : \Zend_Amf_Response
todo | should implement and SPL observer pattern for custom AMF headers |
---|---|
todo | DescribeService support |
\Zend_Amf_Request
\Zend_Amf_server_Exception \Exception
|
---|
\Zend_Amf_Response
_handleAuth(string $userid, string $password) : boolean
string
string
boolean
_loadCommandMessage(\Zend_Amf_Value_Messaging_CommandMessage $message) : \Zend_Amf_Value_Messaging_AcknowledgeMessage
getLoader() : \Zend_Loader_PluginLoader
\Zend_Loader_PluginLoader
$_acl : \Zend_Acl
$_auth : \Zend_Amf_Auth_Abstract
$_classAllowed : array
array()
Keys are class names.
$_loader : \Zend_Loader_PluginLoader
$_methods : array
array()
$_production : boolean
true
$_request : null | \Zend_Amf_Request
null
$_response : null | \Zend_Amf_Response
$_sesionNamespace : \Zend_Session_NameSpace
'zend_amf'
$_session : boolean
false
$_sessionName : string
'PHPSESSID'
$_table : array
array()