public function registerFilter($extension, $filter)
    {
        if (is_array($extension)) {
            foreach ($extension as $_extension) {
                $this->registerFilter($_extension, $filter);
            }
            return;
        }

        $extension = strtolower($extension);

        if (!isset($this->filters[$extension])) {
            $this->filters[$extension] = [];
        }

        if ($filter !== null) {
            $this->filters[$extension][] = $filter;
        }

        return $this;
    }
public function registerFilter($extension, $filter)
    {
        if (is_array($extension)) {
            foreach ($extension as $_extension) {
                $this->registerFilter($_extension, $filter);
            }
            return;
        }

        $extension = strtolower($extension);

        if (!isset($this->filters[$extension])) {
            $this->filters[$extension] = [];
        }

        if ($filter !== null) {
            $this->filters[$extension][] = $filter;
        }

        return $this;
    }
public function registerFilter ( $ extension , $ filter ) { if ( is_array ( $ extension ) ) { foreach ( $ extension as $ _extension ) { $ this -> registerFilter ( $ _extension , $ filter ) ; } return ; } $ extension = strtolower ( $ extension ) ; if ( ! isset ( $ this -> filters [ $ extension ] ) ) { $ this -> filters [ $ extension ] = [ ] ; } if ( $ filter !== null ) { $ this -> filters [ $ extension ] [ ] = $ filter ; } return $ this ; }
Register a filter to apply to the combining process.
@param string|array $extension Extension name. Eg: css
@param object $filter Collection of files to combine.
@return self
Register a filter to apply to the combining process .