Amf/Parse/TypeLoader.php
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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Amf
- Subpackage
- Parse
- Version
- $Id: TypeLoader.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Amf_Parse_TypeLoader
- Copyright
- Copyright (c) 2005-2012 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')Default class map
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')AMF class map
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) : voidAdd directory to the list of places where to look for resource handlers
| Name | Type | Description |
|---|---|---|
| $prefix | string | |
| $dir | string |

getMappedClassName(string $className) : stringLooks up the supplied call name to its mapped class name
| Name | Type | Description |
|---|---|---|
| $className | string |
| Type | Description |
|---|---|
| string |

getResourceParser(resource $resource) : stringGet plugin class that handles this resource
| Name | Type | Description |
|---|---|---|
| $resource | resource | Resource type |
| Type | Description |
|---|---|
| string | Class name |

handleResource(resource $resource) : mixedConvert resource to a serializable object
| Name | Type | Description |
|---|---|---|
| $resource | resource |
| Type | Description |
|---|---|
| mixed |

loadType(string $className) : object | falseLoad the mapped class type into a callback.
| Name | Type | Description |
|---|---|---|
| $className | string |
| Type | Description |
|---|---|
| object | false |

setMapping(string $asClassName, string $phpClassName) : voidMap 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.
| Name | Type | Description |
|---|---|---|
| $asClassName | string | |
| $phpClassName | string |

setResourceLoader(\Zend_Loader_PluginLoader_Interface $loader) : voidSet loader for resource type handlers
| Name | Type | Description |
|---|---|---|
| $loader | \Zend_Loader_PluginLoader_Interface |