示例#1
0
 public function transform(&$results)
 {
     if ($this->field) {
         $fields = FluentArray::from($results)->map(Functions::extractExpression($this->field))->flatten()->filterNotBlank()->toArray();
         $this->transformer->transform($fields);
     } else {
         $this->transformer->transform($results);
     }
 }
示例#2
0
文件: Model.php 项目: letsdrink/ouzo
 private function _fetchRelation($name)
 {
     $relation = $this->getRelation($name);
     $relationFetcher = new RelationFetcher($relation);
     $results = array($this);
     $relationFetcher->transform($results);
 }