/** * 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); } }
/** * {@inheritdoc} */ public function exist() { return $this->session->has($this->namespace); }
/** * Destroy bag */ public function destroy() { $this->initialize(); $this->session->remove($this->name); }