Esempio n. 1
0
 /**
  * Load Services
  *
  * @return void
  */
 public function loadServices()
 {
     $this->container->setShared('registry', new Registry(), true);
     if ('cli' !== PHP_SAPI) {
         $this->container->setShared('cookies', new Cookies(), true);
         $this->container->setShared('session', function () {
             $session = new Session();
             $session->start();
             return $session;
         }, true);
     }
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function exist()
 {
     return $this->session->has($this->namespace);
 }
Esempio n. 3
0
 /**
  * Destroy bag
  */
 public function destroy()
 {
     $this->initialize();
     $this->session->remove($this->name);
 }