Drest\DrestException::metadataCacheNotConfigured PHP Method

metadataCacheNotConfigured() public static method

Set up and configuration
public static metadataCacheNotConfigured ( )
    public static function metadataCacheNotConfigured()
    {
        return new self('Class Metadata Cache is not configured, ensure an instance of Doctrine\\Common\\Cache\\Cache' . 'is passed to the Drest\\Configuration::setMetadataCacheImpl()');
    }

Usage Example

Beispiel #1
0
 /**
  * Ensures that this Configuration instance contains settings that are
  * suitable for a production environment.
  *
  * @throws DrestException If a configuration setting has a value that is not suitable for a production.
  */
 public function ensureProductionSettings()
 {
     if ($this->inDebugMode()) {
         throw DrestException::currentlyRunningDebugMode();
     }
     if (!$this->getMetadataCacheImpl()) {
         throw DrestException::metadataCacheNotConfigured();
     }
 }