views:

16

answers:

1

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->handle();

WORKS

$server = new Zend_Amf_Server();
$server->setClass('MyAmfService');
echo $server->handle();

Any help is appreciated

Thanks!

+1  A: 

To answer my own question - it looks like the path was being pick. Im on a Windows box and changing

$server->addDirectory(APPLICATION_PATH . '/services/');

to

$server->addDirectory(APPLICATION_PATH . '\services\');

dittonamed