コード例 #1
0
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->configureMiddlewares();
     $this->configureRoutes();
     $this->configureBundles();
 }
コード例 #2
0
 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']);
 }
コード例 #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);
 }
コード例 #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');
     }
 }
コード例 #5
0
 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);
 }
コード例 #6
0
 public function offsetGet($key)
 {
     return parent::offsetGet(strtolower($key));
 }
コード例 #7
0
 public function __construct(array $options = [])
 {
     $options = Options::create([])->merge($options);
     parent::__construct($options);
 }