public function __construct(array $options = array())
{
// Default options
$this->environment = isset($options['environment']) && $options['environment'] ? (string) $options['environment'] : 'prod';
$this->debug = isset($options['debug']) && null !== $options['debug'] ? (bool) $options['debug'] : false;
$this->rootDir = isset($options['rootDir']) && $options['rootDir'] ? (string) $options['rootDir'] : $this->getRootDir();
$this->name = isset($options['name']) && $options['name'] ? (string) $options['name'] : $this->getName();
if ($this->debug) {
$this->startTime = microtime(true);
Debug::enable();
} else {
ini_set('display_errors', 0);
}
}