/** * Throws an exception if the EntityManager is closed or currently not active. * * @return void * * @throws ORMException If the EntityManager is closed. */ private function errorIfClosed() { if ($this->closed) { throw ORMException::entityManagerClosed(); } }