Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function bootstrap(ContainerInterface $container, ErrorHandlerInterface $errors, EventEmitterInterface $events)
 {
     $this->handler->register();
     $this->handler->start();
     $this->accessor = new SessionAccessor(new \ArrayObject($_SESSION));
     $this->control = new SessionControl($this->accessor);
     /*
      * Bind the accessor and control instance to the request
      * application wide.
      */
     $container->bind($this->accessor, SessionAccessorInterface::class);
     $container->bind($this->control, SessionControlInterface::class);
 }
Ejemplo n.º 2
0
 /**
  * Bootstraps the application by running configurations specific for
  * the module.
  *
  * @param ContainerInterface    $container
  * @param ErrorHandlerInterface $errors
  * @param EventEmitterInterface $events
  *
  * @return void
  */
 public function bootstrap(ContainerInterface $container, ErrorHandlerInterface $errors, EventEmitterInterface $events)
 {
     $container->bind(new CookieAccessor($_COOKIE), CookieAccessorInterface::class);
 }