Example #1
0
 public function UpdateProfile(Profile $profile)
 {
     $data = $profile->GetArrayCopy();
     //
     //  Remove any null values and unset the username just in case
     //
     foreach ($data as $key => $datum) {
         if (is_null($datum)) {
             unset($data[$key]);
         }
     }
     if (isset($data['username'])) {
         unset($data['username']);
     }
     $this->tableGateway->update($data, array('id' => $profile->id));
 }