public function create(Configuration $config)
 {
     $helpers = new BindingServiceLocator($this->container);
     $this->container->eachMarked(function (ExpressViewHelper $helper, BindingInterface $binding) use($helpers) {
         $helpers->registerService($binding, $helper->namespace . '>' . $helper->name);
     });
     return new ContainerViewHelperManager($helpers);
 }
Beispiel #2
0
 public function createSecurityMiddleware(ContainerInterface $container)
 {
     $firewalls = new BindingServiceLocator($container);
     $container->eachMarked(function (Firewall $firewall, BindingInterface $binding) use($firewalls) {
         $firewalls->registerService($binding);
     });
     return new SecurityMiddleware($firewalls);
 }