Zend_Amf & addDirectory() vs setClass()
Is anyone else having problems with Zend_Amf's addDirectory()?
It is supposed to autoload service classes and doesn't seem to. Though it works with setClass just fine. See snippet below.
Ive seen olders posts on ZF 1.8 that had a bug like this. Is it possible that this bug still exists or am I missing something?
I'm starting up the server the normal way, like so:
Fails
$server = new Zend_Amf_Server();
$server->addDirectory(APPLICATION_PATH . '/services/');
echo $server->开发者_C百科handle();
WORKS
$server = new Zend_Amf_Server();
$server->setClass('MyAmfService');
echo $server->handle();
Any help is appreciated
Thanks!
To answer my own question - it looks like the path was being picky. Im on a Windows box and changing
$server->addDirectory(APPLICATION_PATH . '/services/');
to
$server->addDirectory(APPLICATION_PATH . '\services\');
did the trick
精彩评论