Exemplo n.º 1
0
 private function update(Person $aPerson)
 {
     $db = $this->db();
     $db->createCommand()->update(self::$tableName, ['studio_id' => $aPerson->studioId(), 'first_name' => $aPerson->firstName(), 'last_name' => $aPerson->lastName(), 'sex' => $aPerson->sex() ? $aPerson->sex()->type() : null, 'date_birth' => $aPerson->dateBirth() ? $aPerson->dateBirth()->format('Y-m-d H:i:s') : null, 'mob_phone' => $aPerson->mobPhone(), 'phone' => $aPerson->phone(), 'address' => $aPerson->address(), 'email' => $aPerson->email(), 'about' => $aPerson->about()], ['id' => $aPerson->id()])->execute();
 }