Doctrine\ODM\MongoDB\MongoDBException::documentManagerClosed PHP Method

documentManagerClosed() public static method

public static documentManagerClosed ( ) : MongoDBException
return MongoDBException
    public static function documentManagerClosed()
    {
        return new self('The DocumentManager is closed.');
    }

Usage Example

 /**
  * Throws an exception if the DocumentManager is closed or currently not active.
  *
  * @throws ORMException If the DocumentManager is closed.
  */
 private function _errorIfClosed()
 {
     if ($this->_closed) {
         throw MongoDBException::documentManagerClosed();
     }
 }