Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext::getId PHP Method

getId() public method

public getId ( )
    public function getId()
    {
        return $this->context->getId();
    }

Usage Example

Esempio n. 1
0
 /**
  * Called when the user has left the page.
  *
  * @param MessageHandlerContext $context
  * @param array $msg
  *
  * @return array
  */
 private function leave(MessageHandlerContext $context, array $msg)
 {
     $this->removeCollaboration($msg['type'], $msg['id'], $context->getId());
     $users = $this->getUsersInformation($msg['type'], $msg['id']);
     $this->sendUpdate($msg['type'], $msg['id'], $users);
     return ['type' => $msg['type'], 'id' => $msg['id'], 'users' => $users];
 }