PHP Class Thruway\Peer\Router

Inheritance: implements Thruway\Peer\RouterInterface, implements Thruway\Event\EventSubscriberInterface
Afficher le fichier Open project: voryx/thruway Class Usage Examples

Protected Properties

Свойство Type Description
$started boolean

Méthodes publiques

Méthode Description
__construct ( React\EventLoop\LoopInterface $loop = null ) Constructor
addInternalClient ( Thruway\Peer\ClientInterface $client ) Add a client that uses the internal transport provider
addTransportProvider ( Thruway\Transport\RouterTransportProviderInterface $transportProvider ) Add a transport provider
createNewSession ( Thruway\Transport\TransportInterface $transport )
getAuthenticationManager ( ) Get authentication manager
getAuthorizationManager ( )
getEventDispatcher ( ) : Thruway\Event\EventDispatcherInterface
getLoop ( ) : React\EventLoop\LoopInterface Get loop
getRealmManager ( ) : RealmManager Get realm manager
getSessionBySessionId ( integer $sessionId ) : Session | boolean Get session by session ID
getSubscribedEvents ( ) Register for events
handleConnectionClose ( ConnectionCloseEvent $event )
handleConnectionOpen ( ConnectionOpenEvent $event )
managerGetRealms ( ) : array Get list realms
managerGetSessionCount ( ) : array Count number sessions
managerGetSessions ( ) : array Get list sessions
onClose ( Thruway\Transport\TransportInterface $transport ) Handle close transport
onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg ) : void Handle transport received message
registerModule ( Thruway\Module\RouterModuleInterface $module ) Registers a RouterModule
registerModules ( array $modules ) Register Multiple Modules
setAuthenticationManager ( $authenticationManager ) Set authentication manager
setAuthorizationManager ( $authorizationManager )
setRealmManager ( RealmManager $realmManager ) Set realm manager
start ( boolean $runLoop = true ) Start router
stop ( $gracefully = true )

Method Details

__construct() public méthode

Constructor
public __construct ( React\EventLoop\LoopInterface $loop = null )
$loop React\EventLoop\LoopInterface

addInternalClient() public méthode

Add a client that uses the internal transport provider
public addInternalClient ( Thruway\Peer\ClientInterface $client )
$client Thruway\Peer\ClientInterface

addTransportProvider() public méthode

Add a transport provider
public addTransportProvider ( Thruway\Transport\RouterTransportProviderInterface $transportProvider )
$transportProvider Thruway\Transport\RouterTransportProviderInterface

createNewSession() public méthode

public createNewSession ( Thruway\Transport\TransportInterface $transport )
$transport Thruway\Transport\TransportInterface

getAuthenticationManager() public méthode

Get authentication manager
Deprecation:

getAuthorizationManager() public méthode

Deprecation:

getEventDispatcher() public méthode

public getEventDispatcher ( ) : Thruway\Event\EventDispatcherInterface
Résultat Thruway\Event\EventDispatcherInterface

getLoop() public méthode

Get loop
public getLoop ( ) : React\EventLoop\LoopInterface
Résultat React\EventLoop\LoopInterface

getRealmManager() public méthode

Get realm manager
public getRealmManager ( ) : RealmManager
Résultat Thruway\RealmManager

getSessionBySessionId() public méthode

Get session by session ID
public getSessionBySessionId ( integer $sessionId ) : Session | boolean
$sessionId integer
Résultat Thruway\Session | boolean

getSubscribedEvents() public static méthode

Register for events
public static getSubscribedEvents ( )

handleConnectionClose() public méthode

public handleConnectionClose ( ConnectionCloseEvent $event )
$event Thruway\Event\ConnectionCloseEvent

handleConnectionOpen() public méthode

public handleConnectionOpen ( ConnectionOpenEvent $event )
$event Thruway\Event\ConnectionOpenEvent

managerGetRealms() public méthode

Get list realms
public managerGetRealms ( ) : array
Résultat array

managerGetSessionCount() public méthode

Count number sessions
public managerGetSessionCount ( ) : array
Résultat array

managerGetSessions() public méthode

Get list sessions
public managerGetSessions ( ) : array
Résultat array

onClose() public méthode

Handle close transport
public onClose ( Thruway\Transport\TransportInterface $transport )
$transport Thruway\Transport\TransportInterface

onMessage() public méthode

Handle transport received message
public onMessage ( Thruway\Transport\TransportInterface $transport, Thruway\Message\Message $msg ) : void
$transport Thruway\Transport\TransportInterface
$msg Thruway\Message\Message
Résultat void

registerModule() public méthode

Registers a RouterModule
public registerModule ( Thruway\Module\RouterModuleInterface $module )
$module Thruway\Module\RouterModuleInterface

registerModules() public méthode

Register Multiple Modules
public registerModules ( array $modules )
$modules array

setAuthenticationManager() public méthode

Set authentication manager
Deprecation:
public setAuthenticationManager ( $authenticationManager )

setAuthorizationManager() public méthode

Deprecation:
public setAuthorizationManager ( $authorizationManager )
$authorizationManager

setRealmManager() public méthode

Set realm manager
public setRealmManager ( RealmManager $realmManager )
$realmManager Thruway\RealmManager

start() public méthode

Start router
public start ( boolean $runLoop = true )
$runLoop boolean

stop() public méthode

public stop ( $gracefully = true )

Property Details

$started protected_oe property

protected bool $started
Résultat boolean