/** * {@inheritdoc} */ public function getSubProtocols() { if ($this->_app instanceof WsServerInterface) { return $this->_app->getSubProtocols(); } else { return array(); } }
/** * @param string * @return boolean */ public function isSubProtocolSupported($name) { if (!$this->isSpGenerated) { if ($this->_decorating instanceof WsServerInterface) { $this->acceptedSubProtocols = array_flip($this->_decorating->getSubProtocols()); } $this->isSpGenerated = true; } return array_key_exists($name, $this->acceptedSubProtocols); }