tags:

views:

34

answers:

1

Hi,

I'm wondering if I can use a constructor within a class I am writing to provide a Zend_Amf gateway. When I do:

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

Does foo's constructor get run here? The reason for asking is that I need my 'Foo' class to access other objects and it would make sense to initialise them in my constructor. If not, whats the best way to approach this?

thanks,

A: 

The answer is No but you can pass an instantiated object in i.e setClass($foo)

codecowboy
Unfortunately the constructor cannot contain required arguments...
Marijn Huizendveld