lib/Minify/Controller/Files.php
public function createConfiguration(array $options)
    {
        // strip controller options

        $files = $options['files'];
        // if $files is a single object, casting will break it
        if (is_object($files)) {
            $files = array($files);
        } elseif (! is_array($files)) {
            $files = (array)$files;
        }
        unset($options['files']);

        $sources = array();
        foreach ($files as $file) {
            try {
                $sources[] = $this->sourceFactory->makeSource($file);
            } catch (Minify_Source_FactoryException $e) {
                $this->logger->error($e->getMessage());

                return new Minify_ServeConfiguration($options);
            }
        }

        return new Minify_ServeConfiguration($options, $sources);
    }
public function createConfiguration(array $options)
    {
        // strip controller options

        $files = $options['files'];
        // if $files is a single object, casting will break it
        if (is_object($files)) {
            $files = array($files);
        } elseif (! is_array($files)) {
            $files = (array)$files;
        }
        unset($options['files']);

        $sources = array();
        foreach ($files as $file) {
            try {
                $sources[] = $this->sourceFactory->makeSource($file);
            } catch (Minify_Source_FactoryException $e) {
                $this->logger->error($e->getMessage());

                return new Minify_ServeConfiguration($options);
            }
        }

        return new Minify_ServeConfiguration($options, $sources);
    }
public function createConfiguration ( array $ options ) { // strip controller options $ files = $ options [ 'files' ] ; // if $files is a single object, casting will break it if ( is_object ( $ files ) ) { $ files = array ( $ files ) ; } elseif ( ! is_array ( $ files ) ) { $ files = ( array ) $ files ; } unset ( $ options [ 'files' ] ) ; $ sources = array ( ) ; foreach ( $ files as $ file ) { try { $ sources [ ] = $ this -> sourceFactory -> makeSource ( $ file ) ; } catch ( Minify_Source_FactoryException $ e ) { $ this -> logger -> error ( $ e -> getMessage ( ) ) ; return new Minify_ServeConfiguration ( $ options ) ; } } return new Minify_ServeConfiguration ( $ options , $ sources ) ; }
Set up file sources

@param array $options controller and Minify options
@return Minify_ServeConfiguration

Controller options:

'files': (required) array of complete file paths, or a single path
Set up file sources