Nette\Configurator::setDebugMode PHP Метод

setDebugMode() публичный Метод

Set parameter %debugMode%.
public setDebugMode ( $value ) : self
Результат self
    public function setDebugMode($value)
    {
        if (is_string($value) || is_array($value)) {
            $value = static::detectDebugMode($value);
        } elseif (!is_bool($value)) {
            throw new Nette\InvalidArgumentException(sprintf('Value must be either a string, array, or boolean, %s given.', gettype($value)));
        }
        $this->parameters['debugMode'] = $value;
        $this->parameters['productionMode'] = !$this->parameters['debugMode'];
        // compatibility
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * @param Configurator
  * @return void
  */
 protected function setupDebugger(Configurator $configurator)
 {
     if (($allowedIPsForDebugging = $this->options->getAllowedIPsForDebugging()) !== NULL) {
         $configurator->setDebugMode($allowedIPsForDebugging);
     }
     $configurator->enableDebugger($this->options->getLogDirectory(), $this->options->getErrorNotificationEmail());
 }
All Usage Examples Of Nette\Configurator::setDebugMode