Свойство | Тип | Описание | |
---|---|---|---|
$_assets | the trigger we use for our own resources | ||
$_cacheBase | css or js | ||
$_cacheTimestamp | a concat of all asset filenames together | ||
$_deprecatedSettingsMap | static array of settings, a merge of DB and filesystem settings | ||
$_pluginSettings | instance of Minimee_SettingsModel | ||
$_settings | max timestamp of all assets | ||
$_type | array of Minimee_AssetModelInterface |
Метод | Описание | |
---|---|---|
deleteExpiredCache ( ) : void | Based on the cache's hashed base, attempts to delete any older versions of same name. | |
init ( ) : void | During startup, fetch settings from our plugin / config | |
makePathToStorageFolder ( ) : String | ||
makeTagsByType ( String $type, Array $assets = [] ) : String | Generate the HTML tag based on type | |
makeTwigMarkupFromHtml ( $html ) : Twig_Markup | Wrapper for how we must return a twig option rather than raw HTML | |
run ( String $type, Array $assets, Array $settings = [] ) : Array | Bool | Main service function that encapsulates an entire Minimee run |
Метод | Описание | |
---|---|---|
abort ( String $e, String $level = LogLevel::Error ) : Bool | Internal function used when aborting due to error | |
appendToCacheBase ( String $name ) : Void | Append an asset's name to the cacheBase | |
cacheExists ( ) : Bool | Checks if the cache exists. | |
checkHeaders ( ) : this | Validate all assets prior to run. | |
createCache ( ) : boolean | Creates cache of assets. | |
ensureCacheExists ( ) : |
Fetch or creates cache. | |
flightcheck ( ) : this | Perform pre-flight checks to ensure we can run. | |
getAssets ( ) : Array | ||
getCacheBase ( ) : string | ||
getCacheTimestamp ( ) : String | ||
getPluginSettings ( ) : Array | get our plugin / config settings | |
getSettings ( ) : |
||
getType ( ) : String | ||
initPluginSettings ( ) : Void | Fetch settings from our plugin / config | |
isCombineEnabled ( ) : boolean | null | Return whether we should combine our cache or not | |
isUrl ( $string ) : boolean | Determine if string is valid URL | |
makeCacheFilename ( ) : String | Returns a complete cache filename. | |
makeHashOfCacheBase ( ) : String | ||
makePathToCacheFilename ( ) : String | ||
makePathToHashOfCacheBase ( ) : String | ||
makeReturn ( ) : String | ||
makeUrlToCacheFilename ( ) : String | ||
minifyAsset ( |
Given an asset, fetches and returns minified contents. | |
minifyCssAsset ( |
Method to (maybe) minify CSS asset | |
minifyJsAsset ( |
Method to (maybe) minify JS asset | |
onCreateCache ( $event ) : Void | Raise our 'onCreateCache' event | |
reset ( ) : this | Safely resets service to prepare for a clean run. | |
setAssets ( Array $assets ) : this | ||
setCacheBase ( String $name ) : |
||
setCacheTimestamp ( String $timestamp ) : |
||
setMaxCacheTimestamp ( craft\DateTime $lastTimeModified ) : |
||
setPluginSettings ( $settings = [] ) : Void | set plugin / config settings | |
setRuntimeSettings ( Array $settingsOverrides ) : |
Configure our service based off the settings in plugin, allowing plugin settings to be overridden at runtime. | |
setSettings ( craft\Minimee_ISettingsModel $settings ) : |
Manually pass in an instance of Minimee_ISettingsModel. | |
setType ( String $type ) : this | ||
supportLegacyNamesAtRuntime ( Array $runtimeSettings = [] ) : Array | Handle backwards-compat for 'cssTagTemplate' and 'jsTagTemplate' setting names. | |
supportLegacyNamesFromConfig ( Array $settings = [] ) : Array | Handle backwards-compat for 'cssTagTemplate' and 'jsTagTemplate' setting names. |
protected abort ( String $e, String $level = LogLevel::Error ) : Bool | ||
$e | String | |
$level | String | |
Результат | Bool |
protected appendToCacheBase ( String $name ) : Void | ||
$name | String | |
Результат | Void |
protected cacheExists ( ) : Bool | ||
Результат | Bool |
protected checkHeaders ( ) : this | ||
Результат | this |
protected createCache ( ) : boolean | ||
Результат | boolean |
public deleteExpiredCache ( ) : void | ||
Результат | void |
protected ensureCacheExists ( ) : |
||
Результат |
protected flightcheck ( ) : this | ||
Результат | this |
protected getPluginSettings ( ) : Array | ||
Результат | Array |
protected getSettings ( ) : |
||
Результат |
protected initPluginSettings ( ) : Void | ||
Результат | Void |
protected isCombineEnabled ( ) : boolean | null | ||
Результат | boolean | null |
protected makeCacheFilename ( ) : String | ||
Результат | String |
protected makePathToCacheFilename ( ) : String | ||
Результат | String |
protected makePathToHashOfCacheBase ( ) : String | ||
Результат | String |
public makePathToStorageFolder ( ) : String | ||
Результат | String |
public makeTagsByType ( String $type, Array $assets = [] ) : String | ||
$type | String | |
$assets | Array | |
Результат | String |
public makeTwigMarkupFromHtml ( $html ) : Twig_Markup | ||
Результат | Twig_Markup |
protected makeUrlToCacheFilename ( ) : String | ||
Результат | String |
protected minifyAsset ( |
||
$asset | ||
Результат | String |
protected minifyCssAsset ( |
||
$asset | ||
Результат | String |
protected minifyJsAsset ( |
||
$asset | ||
Результат | String |
protected onCreateCache ( $event ) : Void | ||
Результат | Void |
protected reset ( ) : this | ||
Результат | this |
public run ( String $type, Array $assets, Array $settings = [] ) : Array | Bool | ||
$type | String | |
$assets | Array | |
$settings | Array | |
Результат | Array | Bool |
protected setAssets ( Array $assets ) : this | ||
$assets | Array | |
Результат | this |
protected setCacheBase ( String $name ) : |
||
$name | String | |
Результат |
protected setCacheTimestamp ( String $timestamp ) : |
||
$timestamp | String | |
Результат |
protected setMaxCacheTimestamp ( craft\DateTime $lastTimeModified ) : |
||
$lastTimeModified | craft\DateTime | |
Результат |
protected setPluginSettings ( $settings = [] ) : Void | ||
Результат | Void |
protected setRuntimeSettings ( Array $settingsOverrides ) : |
||
$settingsOverrides | Array | |
Результат |
protected setSettings ( craft\Minimee_ISettingsModel $settings ) : |
||
$settings | craft\Minimee_ISettingsModel | |
Результат |
protected supportLegacyNamesAtRuntime ( Array $runtimeSettings = [] ) : Array | ||
$runtimeSettings | Array | |
Результат | Array |
protected supportLegacyNamesFromConfig ( Array $settings = [] ) : Array | ||
$settings | Array | |
Результат | Array |
protected $_cacheTimestamp |
protected $_deprecatedSettingsMap |
protected static $_pluginSettings |