PPI\Framework\App::__construct PHP Method

__construct() public method

App constructor.
public __construct ( array $options = [] )
$options array
    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);
        }
    }

Usage Example

 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $this->booted = true;
     // Force it to not boot
 }