Thruway\Module\RouterModuleClient::initModule PHP Method

initModule() public method

Called by the router when it is added
public initModule ( Thruway\Peer\RouterInterface $router, React\EventLoop\LoopInterface $loop )
$router Thruway\Peer\RouterInterface
$loop React\EventLoop\LoopInterface
    public function initModule(RouterInterface $router, LoopInterface $loop)
    {
        $this->router = $router;
        $this->setLoop($loop);
        $this->router->addInternalClient($this);
    }

Usage Example

Esempio n. 1
0
 /**
  * Gets called when the module is initialized in the router
  *
  * @inheritdoc
  */
 public function initModule(RouterInterface $router, LoopInterface $loop)
 {
     parent::initModule($router, $loop);
     $this->routerRealm = $router->getRealmManager()->getRealm($this->getRealm());
     $this->broker = $this->routerRealm->getBroker();
     $this->broker->setStateHandlerRegistry($this);
 }
All Usage Examples Of Thruway\Module\RouterModuleClient::initModule