Class Assets
Located at ext-view-helper-assets/src/MvcCore/Ext/View/Helpers/Assets.php
public
|
|
public static
|
#
SetGlobalOptions( array $options = array() )
Set global static options about minifying and joining together which can bee overwrited by single settings throw calling for example: append() method as another param. |
public static
|
#
SetAssetUrlCompletion( boolean $enable = TRUE )
Strictly enable/disable assets url completing in form '?controller=controller&action=asset&path=...'. Use this method only for cases, when you want to pack your application and you want to have all url adresses to css/js/fonts and images directly to hard drive. |
public static
|
#
SetBasePath( string $basePath )
Set global static $basePath to load assets from any static cdn domain or any other place. |
protected static
string
|
#
getFileImprint( string $fullPath )
Returns file modification imprint by global settings - by md5_file() or by filemtime() - always as a string |
public
string
|
|
public
string
|
|
public
string
|
|
protected
string
|
|
protected
array[]
|
#
filterItemsForNotPossibleMinifiedAndPossibleMinifiedItems( array $items )
Look for every item to render if there is any 'doNotMinify' record to render item separately |
protected
string
|
#
addFileModificationImprintToHrefUrl( string $url, string $path )
Add to href url file modification param by original file |
protected
string
|
|
protected
string
|
|
protected
string
|
|
protected
|
#
saveFileContent( string $fullPath = '', string & $fileContent = '' )
Save atomicly file content in full path by 1 MB to not overflow any memory limits |
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
#
getTmpFileFullPathByPartFilesInfo( array $filesGroupInfo = array(), boolean $minify = FALSE, $extension = '' )
Complete items group tmp directory file name by group source files info |
string |
VERSION
MvcCore Extension - View Helper - Assets - version: Comparation by PHP function version_compare(); |
#
'4.2.0'
|
string |
GROUP_NAME_DEFAULT
Default link group name |
#
'default'
|
string |
FILE_MODIFICATION_DATE_FORMAT
Date format for ?_fmd param timestamp in admin development mode |
#
'Y-m-d_H-i-s'
|
protected
|
$view
Simple app view object |
|
protected
string
|
$actualGroupName
Called $_linksGroupContainer index throw helper function Css() or Js() |
#
''
|
protected
string
|
$streamWrapper
Stream wrapper for actual file save operations (http://php.net/stream_wrapper_register) |
#
''
|
protected static
array
|
$globalOptions
Global options about joining and minifying which can bee overwrited by single settings throw calling for eeample: append() method as another param. All possible options and meanings: - jsJoin - boolean - join JS files in JS group together into single file in tmp dir - jsMinify - boolean - minify JS file in any group by default (it's possible to override for each file) - cssJoin - boolean - join CSS files in CSS group together into single file in tmp dir - cssMinify - boolean - minify CSS file in any group by default (it's possible to override for each file) - tmpDir - string - relative path to temporary dir from application document root, by default: '/Var/Tmp' - fileChecking - string - php function names: md5_file | filemtime (filemtime is not working for PHAR packages, for PHAR packages use slower 'md5_file' value) - assetsUrl - boolean - strictly enable or disable special packge assets url completion in form: '?controller=controller&action=asset&path=...', by default, this switch is automaticly detected by application comple mode. In every compile mode except development mode and strict hdd mode is this switch configured internaly to true. |
#
array(
'jsJoin' => 0,
'jsMinify' => 0,
'cssJoin' => 0,
'cssMinify' => 0,
'tmpDir' => '/Var/Tmp',
'fileChecking' => 'filemtime',
'assetsUrl' => NULL,
)
|
protected static
string
|
$appRoot
Application root directory from request object |
#
''
|
protected static
string
|
$tmpDir
Relative path to store joined and minified files from application root directory. |
#
''
|
protected static
string
|
$basePath
Base not compiled url path from localhost if necessary |
#
NULL
|
protected static
boolean
|
$logingAndExceptions
If true, all messages are logged on hard drive, all exceptions are thrown. |
#
TRUE
|
protected static
boolean
|
$fileChecking
If true, all assets sources existences are checked |
#
FALSE
|
protected static
boolean
|
$fileRendering
If true, all temporary files are rendered |
#
FALSE
|
protected static
boolean
|
$assetsUrlCompletion
If true, method AssetUrl in all css files returns to: 'index.php?controller=controller&action=asset&path=...'. |
#
NULL
|
protected static
string
|
$systemConfigHash
Hash completed as md5(json_encode()) from self::$globalOptions |
#
''
|