mirror of
https://github.com/mrclay/minify.git
synced 2025-08-08 07:06:49 +02:00
Improve docs for Files controller
This commit is contained in:
@@ -9,13 +9,18 @@
|
|||||||
*
|
*
|
||||||
* E.g. the following would serve the minified Javascript for a site
|
* E.g. the following would serve the minified Javascript for a site
|
||||||
* <code>
|
* <code>
|
||||||
* Minify::serve('Files', array(
|
* $options = [
|
||||||
* 'files' => array(
|
* 'checkAllowDirs' => false, // allow files to be anywhere
|
||||||
* '//js/jquery.js'
|
* ];
|
||||||
* ,'//js/plugins.js'
|
* $sourceFactory = new Minify_Source_Factory($env, $options, $cache);
|
||||||
* ,'/home/username/file.js'
|
* $controller = new Minify_Controller_Files($env, $sourceFactory);
|
||||||
* )
|
* $minify->serve($controller, [
|
||||||
* ));
|
* 'files' => [
|
||||||
|
* '//js/jquery.js',
|
||||||
|
* '//js/plugins.js',
|
||||||
|
* '/home/username/file.js',
|
||||||
|
* ],
|
||||||
|
* ]);
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @package Minify
|
* @package Minify
|
||||||
@@ -23,6 +28,16 @@
|
|||||||
*/
|
*/
|
||||||
class Minify_Controller_Files extends Minify_Controller_Base {
|
class Minify_Controller_Files extends Minify_Controller_Base {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Minify_Env $env Environment
|
||||||
|
* @param Minify_Source_Factory $sourceFactory Source factory. If you need to serve files from any path, this
|
||||||
|
* component must have its "checkAllowDirs" option set to false.
|
||||||
|
*/
|
||||||
|
public function __construct(Minify_Env $env, Minify_Source_Factory $sourceFactory)
|
||||||
|
{
|
||||||
|
parent::__construct($env, $sourceFactory);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up file sources
|
* Set up file sources
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user