ZF-11731: Wrong return on getMappedClass

Issue Type: Bug Created: 2011-09-09T14:27:10.000+0000 Last Updated: 2011-09-09T14:27:10.000+0000 Status: Open Fix version(s): Reporter: Thomas Tourlourat (armetiz) Assignee: Wade Arnold (wadearnold) Tags: - Zend_Amf

Related issues: Attachments:


Zend_Server_AMF::setClass () take as argument a PHP Class. Zend_Server_AMF::setClassMap () take an "AS Class name" and PHP Class.

The AS Class name is more an "alias" to the PHP Class.

Zend_Server_AMF::getFunctions () returns the list of available methods. This data is build using reflection inside setClass method.

First of all, getFunctions doesn't return the "AS Class name".

Secondly, when calling a method through the AMF Server, I'm using Zend_Server_AMF::_dispatch () wich is the normal process. Inside _dispatch method, a call is done on Zend_Amf_Parse_TypeLoader::getMappedClassName (). The Zend_Amf_Parse_TypeLoader::getMappedClassName () function can return AS3ClassName or PHPClassName. Exactly, If i'm calling Zend_Amf_Parse_TypeLoader::getMappedClassName ( AS3PHPClassName ) it's returning a PHPClassName. The opposite is also true.

Here the problem. If I'm calling Zend_Amf_Parse_TypeLoader::getMappedClassName ( PHPClassName ) I have the AS3ClassName, which isn't a PHP Class.

So, If I'm calling through AMF Server a PHPClass it could be work or not, depend on if I have define a classMap or not.

This is a blocked issue because software like ZendServerAmfBrowser can't work with class mapping.

Example. ZendServerAmfBrowser build the available service/method using the Zend_Server_AMF::getFunctions (), so the service name is PHPClassName. AS3ClassName should be more appropriate, remember the first problem. When execute a service/methode from ZendServerAmfBrowser, it's calling a PHPClassName. Zend_Amf_Server use Zend_Amf_Parse_TypeLoader to get the mapped class name of a PHPClassName. If a mapping ASClassName / PHPClasSName is define Zend_Server_AMF try to load the AS3ClassName, which is the real problem.

The solution is to define on Zend_Amf_Parse_TypeLoader a new method which return only mapped PHPClassName.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.