public function __construct(GalaxyEntity $galaxyEntity) { $this->posZ = $galaxyEntity->getPosZ(); $this->posY = $galaxyEntity->getPosY(); $this->posX = $galaxyEntity->getPosX(); $this->galaxyId = $galaxyEntity->getGalaxyId(); $this->galaxyName = $galaxyEntity->getName(); }