Bolt\Storage\LazyEntityManager::getEntityManager PHP Method

getEntityManager() public method

public getEntityManager ( ) : EntityManager
return EntityManager
    public function getEntityManager()
    {
        if (!$this->em) {
            $this->em = call_user_func($this->factory);
            if (!$this->em instanceof EntityManager) {
                throw new \LogicException('Factory supplied to LazyEntityManager must return implementation of EntityManager.');
            }
        }
        return $this->em;
    }