Drest\DrestException::currentlyRunningDebugMode PHP Method

currentlyRunningDebugMode() public static method

public static currentlyRunningDebugMode ( )
    public static function currentlyRunningDebugMode()
    {
        return new self('Debug mode is set to on. This will cause configuration exceptions to be' . ' displayed and should be switched off in production');
    }

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();
     }
 }