/** * Update a pet by id * * @param Pet $pet * * @return bool */ public function updatePet($pet) { $id = $pet->getId(); $name = $pet->getName(); $experience = $pet->getExperience(); $brawn = $pet->getBrawn(); $guts = $pet->getGuts(); $essence = $pet->getEssence(); $speed = $pet->getSpeed(); $focus = $pet->getFocus(); $grit = $pet->getGrit(); $active = intval($pet->isActive()); $this->updatePetStatement->bind_param("siiiiiiiii", $name, $experience, $brawn, $guts, $essence, $speed, $focus, $grit, $active, $id); return $this->updatePetStatement->execute(); }