PHP Interface Kraken\Network\Websocket\Driver\Version\VersionManagerInterface

Show file Open project: kraken-php/framework Interface Usage Examples

Public Methods

Method Description
checkVersion ( Kraken\Network\Http\HttpRequestInterface $request ) : boolean Return true if any of enabled versions supports WebSocket protocol demanded in request.
disableVersion ( Kraken\Network\Websocket\Driver\Version\VersionInterface $version ) : Kraken\Network\Websocket\Driver\Version\VersionManagerInterface Disable support for a specific version of the WebSocket protocol.
enableVersion ( Kraken\Network\Websocket\Driver\Version\VersionInterface $version ) : Kraken\Network\Websocket\Driver\Version\VersionManagerInterface Enable support for a specific version of the WebSocket protocol.
getVersion ( Kraken\Network\Http\HttpRequestInterface $request ) : Kraken\Network\Websocket\Driver\Version\VersionInterface | null Get the protocol negotiator for the request, if supported.
getVersionHeader ( ) : string

Method Details

checkVersion() public method

Return true if any of enabled versions supports WebSocket protocol demanded in request.
public checkVersion ( Kraken\Network\Http\HttpRequestInterface $request ) : boolean
$request Kraken\Network\Http\HttpRequestInterface
return boolean

disableVersion() public method

Disable support for a specific version of the WebSocket protocol.
public disableVersion ( Kraken\Network\Websocket\Driver\Version\VersionInterface $version ) : Kraken\Network\Websocket\Driver\Version\VersionManagerInterface
$version Kraken\Network\Websocket\Driver\Version\VersionInterface
return Kraken\Network\Websocket\Driver\Version\VersionManagerInterface

enableVersion() public method

Enable support for a specific version of the WebSocket protocol.
public enableVersion ( Kraken\Network\Websocket\Driver\Version\VersionInterface $version ) : Kraken\Network\Websocket\Driver\Version\VersionManagerInterface
$version Kraken\Network\Websocket\Driver\Version\VersionInterface
return Kraken\Network\Websocket\Driver\Version\VersionManagerInterface

getVersion() public method

Get the protocol negotiator for the request, if supported.
public getVersion ( Kraken\Network\Http\HttpRequestInterface $request ) : Kraken\Network\Websocket\Driver\Version\VersionInterface | null
$request Kraken\Network\Http\HttpRequestInterface
return Kraken\Network\Websocket\Driver\Version\VersionInterface | null

getVersionHeader() public method

public getVersionHeader ( ) : string
return string