示例#1
0
文件: Filter.php 项目: alexukua/opus4
 /**
  * Get a nested associative array representation of the model.
  *
  * @return array A (nested) array representation of the model.
  */
 public function toArray()
 {
     $modelArray = $this->model->toArray();
     $filteredFields = $this->describe();
     $result = array();
     foreach ($filteredFields as $filteredField) {
         $result[$filteredField] = $modelArray[$filteredField];
     }
     return $result;
 }