public function reload() { if (isset($this->petEntity)) { if (!$this->petEntity->closed) { $this->petEntity->close(); } } $newPetProperties = $this->db->getPetProperties($this); if (is_null($newPetProperties)) { $this->petProperties = null; $this->petType = null; return; } $this->petProperties = $newPetProperties; $this->petType = Pets::getPetType($newPetProperties->petTypeUID, $newPetProperties->petIsBaby); }