I integrated my Codeigniter with Doctrine ORM the way described in this great tutorial
http://www.joelverhagen.com/blog/2011/05/setting-up-codeigniter-2-with-doctrine-2-the-right-way/.
It says that standard way in CodeIgniter to access a library in a controller is
$this->libraryName->libraryMember->someMemberFunction;
It means that i can access Doctrine Entity Manager in Codeigniter Controller this way
$this->doctrine->em->someMemberFunction;
The problem is i need to access entity manager in some other place, not just in controller. E.g, i need to use entity manager in some custom model_helper class extending Entity Repository. How can i use it?