Esempio n. 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);
     }
 }
Esempio n. 2
0
 private function _fetchRelation($name)
 {
     $relation = $this->getRelation($name);
     $relationFetcher = new RelationFetcher($relation);
     $results = array($this);
     $relationFetcher->transform($results);
 }