public function getEntityManager()
    {
        if (isset($this->entityManager) && is_object($this->entityManager)) {
            // 5.8 ->
            return $this->entityManager;
        }
        $pkgID = $this->c->getPackageID();
        if ($pkgID > 0) {
            return Package::getByID($pkgID)->getEntityManager();
        } else {
            return ORM::entityManager('app');
        }
    }
public function getEntityManager()
    {
        if (isset($this->entityManager) && is_object($this->entityManager)) {
            // 5.8 ->
            return $this->entityManager;
        }
        $pkgID = $this->c->getPackageID();
        if ($pkgID > 0) {
            return Package::getByID($pkgID)->getEntityManager();
        } else {
            return ORM::entityManager('app');
        }
    }
public function getEntityManager ( ) { if ( isset ( $ this -> entityManager ) && is_object ( $ this -> entityManager ) ) { // 5.8 -> return $ this -> entityManager ; } $ pkgID = $ this -> c -> getPackageID ( ) ; if ( $ pkgID > 0 ) { return Package :: getByID ( $ pkgID ) -> getEntityManager ( ) ; } else { return ORM :: entityManager ( 'app' ) ; } }
Gets the controller specific entity manager. If the controller belongs
to a package, returns the package's entity manager. Otherwise returns
the application specific entity manager.
Gets the controller specific entity manager . If the controller belongs to a package returns the package s entity manager . Otherwise returns the application specific entity manager .