Moodle  2.2.1
http://www.collinsharper.com
Minify_Source Class Reference

Public Member Functions

 __construct ($spec)
 getContent ()
 getId ()

Static Public Member Functions

static haveNoMinifyPrefs ($sources)
static getDigest ($sources)
static getContentType ($sources)

Data Fields

 $lastModified = null
 $minifier = null
 $minifyOptions = null
 $filepath = null
 $contentType = null

Protected Attributes

 $_content = null
 $_getContentFunc = null
 $_id = null

Detailed Description

Definition at line 16 of file Source.php.


Constructor & Destructor Documentation

__construct ( spec)

Create a Minify_Source

In the $spec array(), you can either provide a 'filepath' to an existing file (existence will not be checked!) or give 'id' (unique string for the content), 'content' (the string content) and 'lastModified' (unixtime of last update).

As a shortcut, the controller will replace "//" at the beginning of a filepath with $_SERVER['DOCUMENT_ROOT'] . '/'.

Parameters:
array$specoptions

Definition at line 56 of file Source.php.


Member Function Documentation

Get content

Returns:
string

Definition at line 105 of file Source.php.

static getContentType ( sources) [static]

Get content type from a group of sources

This is called if the user doesn't pass in a 'contentType' options

Parameters:
array$sourcesMinify_Source instances
Returns:
string content type. e.g. 'text/css'

Definition at line 173 of file Source.php.

Here is the caller graph for this function:

static getDigest ( sources) [static]

Get unique string for a set of sources

Parameters:
array$sourcesMinify_Source instances
Returns:
string

Definition at line 154 of file Source.php.

Here is the caller graph for this function:

getId ( )

Get id

Returns:
string

Definition at line 124 of file Source.php.

static haveNoMinifyPrefs ( sources) [static]

Verifies a single minification call can handle all sources

Parameters:
array$sourcesMinify_Source instances
Returns:
bool true iff there no sources with specific minifier preferences.

Definition at line 136 of file Source.php.

Here is the caller graph for this function:


Field Documentation

$_content = null [protected]

Definition at line 183 of file Source.php.

$_getContentFunc = null [protected]

Definition at line 184 of file Source.php.

$_id = null [protected]

Definition at line 185 of file Source.php.

$contentType = null

Definition at line 41 of file Source.php.

$filepath = null

Definition at line 36 of file Source.php.

$lastModified = null

Definition at line 21 of file Source.php.

$minifier = null

Definition at line 26 of file Source.php.

$minifyOptions = null

Definition at line 31 of file Source.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations