/** * @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; }