public function getSession() { $session = new Session($this->getParameter('session.name')); if ($this->hasParameter('session.id')) { $session->setId($this->getParameter('session.id')); } $session->start(); return $session; }
/** * @return \PSX\Session */ public function getSession() { $name = $this->hasParameter('session.name') ? $this->getParameter('session.name') : 'psx'; $session = new Session($name); if (PHP_SAPI != 'cli') { $session->start(); } return $session; }