transform() public method

public transform ( &$results )
Esempio n. 1
0
 private function _fetchRelations($results, $joinsToStore)
 {
     $joinedRelations = Arrays::map($joinsToStore, Functions::extract()->destinationField());
     foreach ($this->relationsToFetch as $relationToFetch) {
         if (!in_array($relationToFetch->destinationField, $joinedRelations)) {
             $relationFetcher = new RelationFetcher($relationToFetch->relation);
             $fieldTransformer = new FieldTransformer($relationToFetch->field, $relationFetcher);
             $fieldTransformer->transform($results);
         }
     }
     return $results;
 }