Beispiel #1
0
 /**
  * {@inheritdoc}
  * @param callable|Middleware|MiddlewareFactory $httpStack
  */
 public function __construct(array $modules = [], $environment = 'prod', $httpStack = null)
 {
     array_unshift($modules, 'stratify');
     if ($httpStack) {
         $this->addConfig(['http' => function (ContainerInterface $container) use($httpStack) {
             $treeCompiler = $container->get(TreeCompiler::class);
             return $treeCompiler->compile($httpStack);
         }]);
     }
     parent::__construct($modules, $environment);
 }