public function __construct(ConnectionInterface $conn) { if (isset($conn->WebSocket)) { $this->request = $conn->WebSocket->request; $this->query = $this->request->getUrl(true)->getQuery(); } if (isset($conn->Session)) { $this->session = $conn->Session; } $sessionName = ini_get('session.name'); if (isset($this->request) && isset($this->request->getCookies()[$sessionName])) { $this->id = $this->request->getCookies()[$sessionName]; } elseif (isset($conn->resourceId)) { $this->id = $conn->resourceId; } $this->parameters = new ParameterBag(); }
/** * Get an array of Cookies * * @return array */ public function getCookies() { return $this->wrapped->getCookies(); }