/** * Returns websocket context for given connection. * * @param ConnectionInterface $conn * * @return ConnectionContextInterface */ protected function getContext(ConnectionInterface $conn) { $id = ConnectionContext::getIdFromConnection($conn); if (!$this->contexts->contains($id)) { $this->saveContext($this->createContext($conn)); } return $this->contexts->fetch($id); }
public function __construct($firewall, ConnectionInterface $conn) { parent::__construct($conn); $this->firewall = $firewall; }