PHP Class Thruway\AbstractSession

Show file Open project: voryx/thruway Class Usage Examples

Protected Properties

Property Type Description
$authenticated boolean
$loop React\EventLoop\LoopInterface
$pingRequests array
$realm Realm
$sessionId integer
$state integer
$transport Thruway\Transport\TransportInterface

Public Methods

Method Description
abort ( mixed $details = null, mixed $responseURI = null ) process abort request
getAuthenticated ( ) : boolean Get authentication state (authenticated or not)
getLoop ( ) : React\EventLoop\LoopInterface Get loop
getRealm ( ) : Realm Get realm
getSessionId ( ) : integer Get session ID
getState ( ) : integer Get client state
getTransport ( ) : Thruway\Transport\TransportInterface Get transport
isAuthenticated ( ) : boolean check is authenticated
isGoodbyeSent ( ) : boolean Check sent Goodbye message
ping ( integer $timeout = 5 ) : Promise Ping
sendMessage ( Thruway\Message\Message $msg ) : mixed Send message
setAuthenticated ( boolean $authenticated ) Set athentication state (authenticated or not)
setGoodbyeSent ( boolean $goodbyeSent ) Set state sent goodbye message ?
setLoop ( React\EventLoop\LoopInterface $loop ) Set loop
setRealm ( Realm $realm ) Set realm
setState ( integer $state ) Set client state
shutdown ( ) Process Shutdown session

Method Details

abort() public method

process abort request
public abort ( mixed $details = null, mixed $responseURI = null )
$details mixed
$responseURI mixed

getAuthenticated() public method

Get authentication state (authenticated or not)
public getAuthenticated ( ) : boolean
return boolean

getLoop() public method

Get loop
public getLoop ( ) : React\EventLoop\LoopInterface
return React\EventLoop\LoopInterface

getRealm() public method

Get realm
public getRealm ( ) : Realm
return Realm

getSessionId() public method

Get session ID
public getSessionId ( ) : integer
return integer

getState() public method

Get client state
public getState ( ) : integer
return integer

getTransport() public method

Get transport
public getTransport ( ) : Thruway\Transport\TransportInterface
return Thruway\Transport\TransportInterface

isAuthenticated() public method

check is authenticated
public isAuthenticated ( ) : boolean
return boolean

isGoodbyeSent() public method

Check sent Goodbye message
public isGoodbyeSent ( ) : boolean
return boolean

ping() public method

Ping
public ping ( integer $timeout = 5 ) : Promise
$timeout integer
return React\Promise\Promise

sendMessage() abstract public method

Send message
abstract public sendMessage ( Thruway\Message\Message $msg ) : mixed
$msg Thruway\Message\Message
return mixed

setAuthenticated() public method

Set athentication state (authenticated or not)
public setAuthenticated ( boolean $authenticated )
$authenticated boolean

setGoodbyeSent() public method

Set state sent goodbye message ?
public setGoodbyeSent ( boolean $goodbyeSent )
$goodbyeSent boolean

setLoop() public method

Set loop
public setLoop ( React\EventLoop\LoopInterface $loop )
$loop React\EventLoop\LoopInterface

setRealm() public method

Set realm
public setRealm ( Realm $realm )
$realm Realm

setState() public method

Set client state
public setState ( integer $state )
$state integer

shutdown() public method

Process Shutdown session
public shutdown ( )

Property Details

$authenticated protected property

protected bool $authenticated
return boolean

$loop protected property

protected LoopInterface,React\EventLoop $loop
return React\EventLoop\LoopInterface

$pingRequests protected property

protected array $pingRequests
return array

$realm protected property

protected Realm,Thruway $realm
return Realm

$sessionId protected property

protected int $sessionId
return integer

$state protected property

protected int $state
return integer

$transport protected property

protected TransportInterface,Thruway\Transport $transport
return Thruway\Transport\TransportInterface