프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_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 |
public deleteExpiredCache ( ) : void | ||
리턴 | void |
protected ensureCacheExists ( ) : |
||
리턴 |
protected flightcheck ( ) : this | ||
리턴 | this |
protected getPluginSettings ( ) : Array | ||
리턴 | Array |
protected initPluginSettings ( ) : Void | ||
리턴 | Void |
protected isCombineEnabled ( ) : boolean | null | ||
리턴 | boolean | null |
protected makeCacheFilename ( ) : String | ||
리턴 | String |
public makeTagsByType ( String $type, Array $assets = [] ) : String | ||
$type | String | |
$assets | Array | |
리턴 | String |
public makeTwigMarkupFromHtml ( $html ) : Twig_Markup | ||
리턴 | Twig_Markup |
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 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 $_deprecatedSettingsMap |
protected static $_pluginSettings |