Amf/Parse/TypeLoader.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Amf
- Subpackage
- Parse
- Version
- $Id$
\Zend_Amf_Parse_TypeLoader
Package: Zend_Amf\Parse
Loads a local class and executes the instantiation of that class.
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Todo
- PHP 5.3 can drastically change this class w/ namespace and the new call_user_func w/ namespace
Properties
array $_defaultClassMap = array('flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection')
static
Default class map
Default value
array('flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection')
Details- Type
- array
array $classMap = array('flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection')
static
AMF class map
Default value
array('flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage', 'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage', 'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage', 'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage', 'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection')
Details- Type
- array
Methods
addResourceDirectory(string $prefix, string $dir) : void
static
Add directory to the list of places where to look for resource handlers
Parameters
Name | Type | Description |
---|---|---|
$prefix | string | |
$dir | string |
getMappedClassName(string $className) : string
static
Looks up the supplied call name to its mapped class name
Parameters
Returns
Name | Type | Description |
---|---|---|
$className | string |
Type | Description |
---|---|
string |
getResourceParser(resource $resource) : string
static
Get plugin class that handles this resource
Parameters
Returns
Name | Type | Description |
---|---|---|
$resource | resource | Resource type |
Type | Description |
---|---|
string | Class name |
handleResource(resource $resource) : mixed
static
Convert resource to a serializable object
Parameters
Returns
Name | Type | Description |
---|---|---|
$resource | resource |
Type | Description |
---|---|
mixed |
loadType(string $className) : object | false
static
Load the mapped class type into a callback.
Parameters
Returns
Name | Type | Description |
---|---|---|
$className | string |
Type | Description |
---|---|
object | false |
setMapping(string $asClassName, string $phpClassName) : void
static
Map PHP class names to ActionScript class names
Allows users to map the class names of there action script classes
to the equivelent php class name. Used in deserialization to load a class
and serialiation to set the class name of the returned object.
ParametersName | Type | Description |
---|---|---|
$asClassName | string | |
$phpClassName | string |
setResourceLoader(\Zend_Loader_PluginLoader_Interface $loader) : void
static
Set loader for resource type handlers
Parameters
Name | Type | Description |
---|---|---|
$loader | \Zend_Loader_PluginLoader_Interface |