예제 #1
0
 /**
  * Returns an array of only the persistent fields of {@link $model}
  *
  * @param ModelObject $model The modelObject to analyze
  *
  * @return array An array with persistent field names as keys with their values
  */
 public function modelToPersistentArray(ModelObject $model)
 {
     $persistent = array_intersect_key($model->toArray(), array_flip($model->getPersistentFields()));
     return $persistent;
 }