Using Phalcon 1.1.0 and trying to get the DI to work on a \Phalcon\Mvc\Collection
$di->set('myservice', function() {
return $myservice = new myService();
});
$di->set('Data', array(
'className' => 'Namespace\Model\Data',
'calls' => array(
array(
'method' => 'setMyservice',
'value' => array('type' => 'service', 'name' => 'myservice')
),
)
));
But the corresponding method in the collection class never gets called. What am I doing wrong?