PHP Class Thruway\Realm

Mostrar archivo Open project: voryx/thruway Class Usage Examples

Public Methods

Method Description
__construct ( string $realmName ) Constructor
addModule ( Thruway\Module\RealmModuleInterface $module )
addSession ( Session $session )
getBroker ( ) : Broker Get broker
getDealer ( ) : Dealer Get dealer
getRealmName ( ) : mixed Get realm name
getSessions ( ) : SplObjectStorage Get list session
getSubscribedRealmEvents ( ) : array Events that we'll be listening on
handleAbortMessage ( MessageEvent $event )
handleAuthenticateMessage ( MessageEvent $event )
handleGoodbyeMessage ( MessageEvent $event )
handleLeaveRealm ( LeaveRealmEvent $event )
handleSendWelcomeMessage ( MessageEvent $event )
leave ( Session $session ) Process on session leave
managerGetSessions ( ) : array Get list sessions
processGoodbye ( Session $session, Thruway\Message\Message $msg )
publishMeta ( string $topicName, mixed $arguments, mixed $argumentsKw = null, mixed $options = null ) Publish meta

Private Methods

Method Description
processAbort ( Session $session, Thruway\Message\Message $msg ) Process AbortMessage
processAuthenticate ( Session $session, Thruway\Message\AuthenticateMessage $msg ) Process AuthenticateMessage
processSendWelcome ( Session $session, Thruway\Message\WelcomeMessage $msg ) Process HelloMessage

Method Details

__construct() public method

Constructor
public __construct ( string $realmName )
$realmName string

addModule() public method

public addModule ( Thruway\Module\RealmModuleInterface $module )
$module Thruway\Module\RealmModuleInterface

addSession() public method

public addSession ( Session $session )
$session Session

getBroker() public method

Get broker
public getBroker ( ) : Broker
return Thruway\Role\Broker

getDealer() public method

Get dealer
public getDealer ( ) : Dealer
return Thruway\Role\Dealer

getRealmName() public method

Get realm name
public getRealmName ( ) : mixed
return mixed

getSessions() public method

Get list session
public getSessions ( ) : SplObjectStorage
return SplObjectStorage

getSubscribedRealmEvents() public method

Events that we'll be listening on
public getSubscribedRealmEvents ( ) : array
return array

handleAbortMessage() public method

public handleAbortMessage ( MessageEvent $event )
$event Thruway\Event\MessageEvent

handleAuthenticateMessage() public method

public handleAuthenticateMessage ( MessageEvent $event )
$event Thruway\Event\MessageEvent

handleGoodbyeMessage() public method

public handleGoodbyeMessage ( MessageEvent $event )
$event Thruway\Event\MessageEvent

handleLeaveRealm() public method

public handleLeaveRealm ( LeaveRealmEvent $event )
$event Thruway\Event\LeaveRealmEvent

handleSendWelcomeMessage() public method

public handleSendWelcomeMessage ( MessageEvent $event )
$event Thruway\Event\MessageEvent

leave() public method

Process on session leave
public leave ( Session $session )
$session Session

managerGetSessions() public method

todo: this is used by some tests - is leftover from the old manager stuff
public managerGetSessions ( ) : array
return array

processGoodbye() public method

public processGoodbye ( Session $session, Thruway\Message\Message $msg )
$session Session
$msg Thruway\Message\Message

publishMeta() public method

Publish meta
public publishMeta ( string $topicName, mixed $arguments, mixed $argumentsKw = null, mixed $options = null )
$topicName string
$arguments mixed
$argumentsKw mixed
$options mixed