Class Assets
- MvcCore\Ext\Views\Helpers\AbstractHelper implements MvcCore\Ext\Views\Helpers\IHelper
-
MvcCore\Ext\Views\Helpers\Assets
Located at ext-view-helper-assets/src/MvcCore/Ext/Views/Helpers/Assets.php
public
|
|
public static
|
#
SetGlobalOptions( array $options = [] )
Set global static options about minifying and joining together which can bee overwritten 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 addresses 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 |
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 atomically file content in full path by 1 MB to not overflow any memory limits |
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
#
getTmpFileFullPathByPartFilesInfo( array $filesGroupInfo = [], boolean $minify = FALSE, $extension = '' )
Complete items group tmp directory file name by group source files info |
GetInstance()
|
public
|
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'
|
VERSION
|
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 overwritten by single settings throw calling for example: 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 automatically detected by application compile mode. In every compile mode except development mode and strict HDD mode is this switch configured internally to true. |
#
[
'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 |
#
NULL
|
protected static
string
|
$tmpDir
Relative path to store joined and minified files from application root directory. |
#
NULL
|
protected static
string
|
$basePath
Base not compiled URL path from localhost if necessary |
#
NULL
|
protected static
string
|
$scriptName
Request script name. |
#
NULL
|
protected static
boolean
|
$loggingAndExceptions
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 |
#
''
|
protected static
string
|
$ctrlActionKey
|
#
''
|
$controller,
$instance,
$request,
$response
|