/** * @param ServerRequestInterface $request * @param ResponseInterface $response * @param callable|null $next * @return ResponseInterface */ public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) { if (!$this->session->isStarted()) { $this->session->start(); } $request = $request->withAttribute('session', $this->session); if ($next) { return $next($request, $response); } return $response; }
/** * Set a property in the session bucket * * @param string $key The key * @param mixed $value The value * * @return void */ public function set($key, $value) { $this->session->getSegment('Joomla')->set($key, $value); }
/** * {@inheritdoc} */ public function clear($identifier) { $this->session->clear(); }
/** * */ public function destroySession() { $this->session->destroy(); }