Issues

ZF-6552: Zend_Loader_Autoloader_Resource conflicts with Zend_Amf_Server addDirectory()

Issue Type: Improvement Created: 2009-05-06T02:27:08.000+0000 Last Updated: 2012-11-20T20:53:10.000+0000 Status: Closed Fix version(s): Reporter: Jason DeBord (jasond) Assignee: None Tags: - Zend_Amf

  • Zend_Loader

Related issues: Attachments:

Description

Cannot match Zend_Autoloader_Resource namespaces with Zend_Amf_Server

$loader = new Zend_Loader_Autoloader_Resource(array( 'basePath' => APPLICATION_PATH, 'namespace' => '', )); $loader->addResourceType('service', '/services', 'Service_'); $loader->addResourceType('dto', '/dtos', 'Dto_'); $loader->setDefaultResourceType('service');

$server = new Zend_Amf_Server(); $server->setProduction(false); $server->addDirectory(APPLICATION_PATH .'/services');

'Service_' namespace set up to map to the /services directory.

class Service_Amf_Files maps to APPLICATION_PATH/services/Amf/Files.php

When a remote AMF call comes in to Service_Amf_Files, Zend_Amf_Server is looking for /services/Service/Amf/Files . This is because the Amf_Server thinks (correctly) that all it's files are in the /services directory, but it doesn't know anything about the Autoloader_Resource and goes ahead with the class naming conventions as if a 'Service' directory actually exists.

From The Framework mailing list: http://nabble.com/Zend_Autoloader_Resource-and-Zen…

"Using Zend_Autoloader_Resource is working great. Except for one thing: matching

the namespaces up with Zend_Amf_Server

If you haven't already, please add an issue to the tracker for this; most likely, it's the autodiscovery code in Zend_Amf_Server that needs to be slightly modified to allow for autoloading.

Thanks!

Matthew Weier O'Phinney"

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:53:10.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts