/**
  * @param Session $session
  *
  * @return SessionEntity
  */
 protected function createEntity(Session $session)
 {
     $entity = new SessionEntity($this->server);
     $entity->setId($session->getKey());
     $entity->setOwner($session->ownerType, $session->ownerId);
     return $entity;
 }
Exemplo n.º 2
0
 /**
  * @param int $sessionId
  *
  * @return Client
  */
 public static function findBySessionId($sessionId)
 {
     $session = Session::find($sessionId);
     return self::find($session->getAttribute('clientId'));
 }