在构造中调用servicelecator给我null,但在其他函数中运行良好
public function __construct() {
$this->userModel=$this->getservicelecator()->get('doctrine.entitymanager.orm_default')
}
给我null
public function indexAction() {
$this->userModel=$this->getservicelecator()->get('doctrine.entitymanager.orm_default')
}
运作良好