Exemplo n.º 1
0
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->configureMiddlewares();
     $this->configureRoutes();
     $this->configureBundles();
 }
 public function __construct($options = [])
 {
     $options = Options::create(['templatePath' => '../templates', 'accepts' => ['text/html' => true]])->merge($options);
     parent::__construct($options);
     if (is_null($this['renderer'])) {
         throw new \Exception('Renderer not set yet!');
     }
     $this->renderer = new Thing($this['renderer']);
 }
Exemplo n.º 3
0
 public function __construct($attributes = [], $env = null)
 {
     if (is_null($env)) {
         $env = static::$globalEnv;
     } else {
         static::$globalEnv = $env;
     }
     $this->env = $env;
     parent::__construct($attributes);
 }
Exemplo n.º 4
0
 public function __construct($attributes)
 {
     if (is_callable($attributes) || is_object($attributes)) {
         $this->handler = $attributes;
     } elseif (is_array($attributes)) {
         parent::__construct($attributes);
     } else {
         throw new InvalidArgumentException('Thing argument must be instance of callable, object, or array');
     }
 }
 public function __construct(array $options = [])
 {
     $options = Options::create(['renderers' => [], 'matchingTypes' => ['application/x-www-form-urlencoded' => 'text/html', 'multipart/form-data' => 'text/html'], 'accepts' => []])->merge($options);
     // ->toArray();
     parent::__construct($options);
 }
Exemplo n.º 6
0
 public function offsetGet($key)
 {
     return parent::offsetGet(strtolower($key));
 }
 public function __construct(array $options = [])
 {
     $options = Options::create([])->merge($options);
     parent::__construct($options);
 }