Closed anardil closed 13 years ago
Hello,
Thanks for your feedback !
In order to let your controller be managed by the Dependency Injection Container, you have to:
Here is what you should have:
<?php
/** @Controller */
class PostController extends LoSo_Zend_Controller_Action
{
/** @Inject */
protected $postService;
public function setPostService($postService)
{
$this->postService = $postService;
return $this;
}
// ...
}
Let me know if it resolves your problem.
Ok that's works.
In your source is written
<?php /**
You have to replace the annotation above the class definition.
<?php /**
by
<?php /**
Thanks
I pushed a correction for that, thanks! See: bf5ee019a1b4e0e24df8fb8be7e67d968e9a157e.
Hi,
Congratulations for your job. But I've a got a bug in PostController when the service is not called with getContainer().
when I do : Zend_Debug::dump($this->postService), thats returns NULL.
How can I resolve this bug ? Thx.