Flint\Application::__construct PHP Method

__construct() public method

Assigns rootDir and debug to the pimple container. Also replaces the normal resolver with a PimpleAware Resolver.
public __construct ( string $rootDir, boolean $debug = false, array $parameters = [] )
$rootDir string
$debug boolean
$parameters array
    public function __construct($rootDir, $debug = false, array $parameters = array())
    {
        parent::__construct($parameters);
        $this['root_dir'] = $rootDir;
        $this['debug'] = $debug;
        $this->register(new ConfigServiceProvider());
        $this->register(new UrlGeneratorServiceProvider());
        $this->register(new RoutingServiceProvider());
        $this->register(new TwigServiceProvider());
        $this->register(new FlintServiceProvider());
    }

Usage Example

Beispiel #1
0
 public function __construct($rootDir, $env, $debug = false)
 {
     parent::__construct($rootDir, $debug, ['env' => $env]);
     $this->init($env, $debug);
 }
All Usage Examples Of Flint\Application::__construct