entity code: true, 'ownerid' => true, 'petowner' => true, 'species' => true, 'sex' => true, 'ostreet' => true, 'odate' => true, 'ocheck' => true, 'dogpic' => true, ]; protected function _setPetname($petname) { $this->set(strtoupper($petname)); return $petname; } } controller code: public function add() { $pet = $this->Pets->newEntity($this->request->data); //////WHERE DO i SET THE VARIBLE $petname AND HOW DO I CALL THE SETTER AND DO I /////NEED A GETTER AND A SETTER? MANUAL DOES NOT EXPLAIN WHAT TO DO. if ($this->request->is('post')) { if ($this->Pets->save($pet)) { $this->Flash->success('The pet has been saved.'); return $this->redirect(['action' => 'index']); } else { $this->Flash->error('The pet could not be saved. Please, try again.'); } } $this->set(compact('pet')); }