PHP Class Thruway\Role\Broker

Inheritance: extends AbstractRole
Mostra file Open project: voryx/thruway Class Usage Examples

Protected Properties

Property Type Description
$matchers array
$stateHandlerRegistry Thruway\Subscription\StateHandlerRegistry
$subscriptionGroups array

Public Methods

Method Description
__construct ( )
addMatcher ( Thruway\Subscription\MatcherInterface $matcher ) : boolean
getFeatures ( ) : stdClass Return supported features
getMatcherForMatchType ( $matchType ) : Thruway\Subscription\MatcherInterface | boolean
getStateHandlerRegistry ( ) : StateHandlerRegistry
getSubscribedRealmEvents ( ) : array
getSubscriptionById ( $id ) : boolean
getSubscriptionGroups ( ) : array
getSubscriptions ( ) : array
handleLeaveRealm ( LeaveRealmEvent $event )
handlePublishMessage ( MessageEvent $event )
handleSendWelcomeMessage ( MessageEvent $event )
handleSubscribeMessage ( MessageEvent $event )
handleUnsubscribeMessage ( MessageEvent $event )
leave ( Session $session )
managerGetSubscriptions ( ) : array todo: this may be used by testing
setStateHandlerRegistry ( StateHandlerRegistry $stateHandlerRegistry )

Protected Methods

Method Description
processPublish ( Session $session, Thruway\Message\PublishMessage $msg ) Process publish message
processSubscribe ( Session $session, Thruway\Message\SubscribeMessage $msg ) Process subscribe message
processUnsubscribe ( Session $session, Thruway\Message\UnsubscribeMessage $msg ) Process Unsubscribe message

Method Details

__construct() public method

public __construct ( )

addMatcher() public method

public addMatcher ( Thruway\Subscription\MatcherInterface $matcher ) : boolean
$matcher Thruway\Subscription\MatcherInterface
return boolean

getFeatures() public method

Return supported features
public getFeatures ( ) : stdClass
return stdClass

getMatcherForMatchType() public method

public getMatcherForMatchType ( $matchType ) : Thruway\Subscription\MatcherInterface | boolean
$matchType
return Thruway\Subscription\MatcherInterface | boolean

getStateHandlerRegistry() public method

public getStateHandlerRegistry ( ) : StateHandlerRegistry
return Thruway\Subscription\StateHandlerRegistry

getSubscribedRealmEvents() public method

public getSubscribedRealmEvents ( ) : array
return array

getSubscriptionById() public method

public getSubscriptionById ( $id ) : boolean
$id
return boolean

getSubscriptionGroups() public method

public getSubscriptionGroups ( ) : array
return array

getSubscriptions() public method

public getSubscriptions ( ) : array
return array

handleLeaveRealm() public method

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

handlePublishMessage() public method

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

handleSendWelcomeMessage() public method

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

handleSubscribeMessage() public method

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

handleUnsubscribeMessage() public method

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

leave() public method

public leave ( Session $session )
$session Thruway\Session

managerGetSubscriptions() public method

todo: this may be used by testing
public managerGetSubscriptions ( ) : array
return array

processPublish() protected method

Process publish message
protected processPublish ( Session $session, Thruway\Message\PublishMessage $msg )
$session Thruway\Session
$msg Thruway\Message\PublishMessage

processSubscribe() protected method

Process subscribe message
protected processSubscribe ( Session $session, Thruway\Message\SubscribeMessage $msg )
$session Thruway\Session
$msg Thruway\Message\SubscribeMessage

processUnsubscribe() protected method

Process Unsubscribe message
protected processUnsubscribe ( Session $session, Thruway\Message\UnsubscribeMessage $msg )
$session Thruway\Session
$msg Thruway\Message\UnsubscribeMessage

setStateHandlerRegistry() public method

public setStateHandlerRegistry ( StateHandlerRegistry $stateHandlerRegistry )
$stateHandlerRegistry Thruway\Subscription\StateHandlerRegistry

Property Details

$matchers protected_oe property

protected array $matchers
return array

$stateHandlerRegistry protected_oe property

protected StateHandlerRegistry,Thruway\Subscription $stateHandlerRegistry
return Thruway\Subscription\StateHandlerRegistry

$subscriptionGroups protected_oe property

protected array $subscriptionGroups
return array