src/Filter/FilterRegistry.php
public function collection(AssetTarget $target)
    {
        $filters = [];
        foreach ($target->filterNames() as $name) {
            $filter = $this->get($name);
            if ($filter === null) {
                throw new RuntimeException("Filter '$name' was not loaded/configured.");
            }
            // Clone filters so the registry is not polluted.
            $copy = clone $filter;
            $copy->settings([
                'target' => $target->name(),
                'paths' => $target->paths()
            ]);
            $filters[] = $copy;
        }
        return new FilterCollection($filters);
    }
public function collection(AssetTarget $target)
    {
        $filters = [];
        foreach ($target->filterNames() as $name) {
            $filter = $this->get($name);
            if ($filter === null) {
                throw new RuntimeException("Filter '$name' was not loaded/configured.");
            }
            // Clone filters so the registry is not polluted.
            $copy = clone $filter;
            $copy->settings([
                'target' => $target->name(),
                'paths' => $target->paths()
            ]);
            $filters[] = $copy;
        }
        return new FilterCollection($filters);
    }
public function collection ( AssetTarget $ target ) { $ filters = [ ] ; foreach ( $ target -> filterNames ( ) as $ name ) { $ filter = $ this -> get ( $ name ) ; if ( $ filter === null ) { throw new RuntimeException ( "Filter '$name' was not loaded/configured." ) ; } // Clone filters so the registry is not polluted. $ copy = clone $ filter ; $ copy -> settings ( [ 'target' => $ target -> name ( ) , 'paths' => $ target -> paths ( ) ] ) ; $ filters [ ] = $ copy ; } return new FilterCollection ( $ filters ) ; }
Get a filter collection for a specific target.

@param \MiniAsset\AssetTarget $target The target to get a filter collection for.
@return \MiniAsset\Filter\FilterCollection
Get a filter collection for a specific target .