PHP Class Craft\MinimeeTwigExtension

Inheritance: extends Twig_Extension
显示文件 Open project: johndwells/craft.minimee

Public Methods

Method Description
getFilters ( ) : Array Return an array of twig filters
getGlobals ( ) : Array Inject into the template scope a read-only copy of Minimee's runtime settings
getName ( ) : String Name of our twig filter
minimeeFilter ( String $html, Array $settings = [] ) : String Define our filter

Protected Methods

Method Description
detectType ( $html = '' ) Quick string detection to determine type
pregMatchAssetsByType ( $type, $haystack ) : boolean | array Helper function to parse content looking for CSS and JS tags.

Method Details

detectType() protected method

Quick string detection to determine type
protected detectType ( $html = '' )

getFilters() public method

Return an array of twig filters
public getFilters ( ) : Array
return Array

getGlobals() public method

Inject into the template scope a read-only copy of Minimee's runtime settings
public getGlobals ( ) : Array
return Array

getName() public method

Name of our twig filter
public getName ( ) : String
return String

minimeeFilter() public method

Define our filter
public minimeeFilter ( String $html, Array $settings = [] ) : String
$html String
$settings Array
return String

pregMatchAssetsByType() protected method

Returns array of links found.
protected pregMatchAssetsByType ( $type, $haystack ) : boolean | array
return boolean | array Array of found matches, or false if none