|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| setupSources ($options) | |
| getDefaultMinifyOptions () | |
| getDefaultMinifers () | |
| loadMinifier ($minifierCallback) | |
| mixInDefaultOptions ($options) | |
| analyzeSources ($options=array()) | |
Static Public Member Functions | |
| static | _fileIsSafe ($file, $safeDirs) |
Data Fields | |
| $sources = array() | |
Protected Member Functions | |
| log ($msg) | |
| static _fileIsSafe | ( | $ | file, |
| $ | safeDirs | ||
| ) | [static] |
Is a user-given file within an allowable directory, existing, and having an extension js/css/html/txt ?
This is a convenience function for controllers that have to accept user-given paths
| string | $file | full file path (already processed by realpath()) |
| array | $safeDirs | directories where files are safe to serve. Files can also be in subdirectories of these directories. |
| analyzeSources | ( | $ | options = array() | ) | [final] |
| loadMinifier | ( | $ | minifierCallback | ) |
Load any code necessary to execute the given minifier callback.
The controller is responsible for loading minification code on demand via this method. This built-in function will only load classes for static method callbacks where the class isn't already defined. It uses the PEAR convention, so, given array('Jimmy_Minifier', 'minCss'), this function will include 'Jimmy/Minifier.php'.
If you need code loaded on demand and this doesn't suit you, you'll need to override this function in your subclass.
| callback | $minifierCallback | callback of minifier function |
Reimplemented in Minify_Controller_Page.
| log | ( | $ | msg | ) | [protected] |
| mixInDefaultOptions | ( | $ | options | ) | [final] |
| setupSources | ( | $ | options | ) | [abstract] |
Setup controller sources and set an needed options for Minify::source
You must override this method in your subclass controller to set $this->sources. If the request is NOT valid, make sure $this->sources is left an empty array. Then strip any controller-specific options from $options and return it. To serve files, $this->sources must be an array of Minify_Source objects.
| array | $options | controller and Minify options |
return array $options Minify::serve options
Reimplemented in Minify_Controller_Groups, Minify_Controller_Files, Minify_Controller_Page, Minify_Controller_Version1, and Minify_Controller_MinApp.