Ouzo\Utilities\Functions::extract PHP Method

extract() public static method

public static extract ( null $type = null ) : Ouzo\Utilities\NonCallableExtractor
$type null
return Ouzo\Utilities\NonCallableExtractor
    public static function extract($type = null)
    {
        return new NonCallableExtractor();
    }

Usage Example

 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;
 }
All Usage Examples Of Ouzo\Utilities\Functions::extract