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