PHP Класс Thruway\Realm

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $realmName )
$realmName string

addModule() публичный Метод

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

addSession() публичный Метод

public addSession ( Session $session )
$session Session

getBroker() публичный Метод

Get broker
public getBroker ( ) : Broker
Результат Thruway\Role\Broker

getDealer() публичный Метод

Get dealer
public getDealer ( ) : Dealer
Результат Thruway\Role\Dealer

getRealmName() публичный Метод

Get realm name
public getRealmName ( ) : mixed
Результат mixed

getSessions() публичный Метод

Get list session
public getSessions ( ) : SplObjectStorage
Результат SplObjectStorage

getSubscribedRealmEvents() публичный Метод

Events that we'll be listening on
public getSubscribedRealmEvents ( ) : array
Результат array

handleAbortMessage() публичный Метод

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

handleAuthenticateMessage() публичный Метод

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

handleGoodbyeMessage() публичный Метод

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

handleLeaveRealm() публичный Метод

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

handleSendWelcomeMessage() публичный Метод

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

leave() публичный Метод

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

managerGetSessions() публичный Метод

todo: this is used by some tests - is leftover from the old manager stuff
public managerGetSessions ( ) : array
Результат array

processGoodbye() публичный Метод

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

publishMeta() публичный Метод

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