PHP Class AssetModel, vanilla

Inheritance: extends CommonModel
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$UrlPrefix string

Protected Properties

Свойство Type Description
$_CssFiles List of CSS files to serve.

Méthodes publiques

Méthode Description
addCssFile ( $filename, boolean $folder = false, boolean $options = false ) Add to the list of CSS files to serve.
cssPath ( string $filename, string $folder = '', string $themeType = '' ) : array | boolean Lookup the path to a CSS file and return its info array
eTag ( ) : string Generate an e-tag for the application from the versions of all of its enabled applications/plugins.
getAnchors ( ) : array Get list of CSS anchor files
getCssFiles ( $themeType, $basename, $eTag, null &$notFound = null ) : array
jsPath ( string $filename, string $folder = '', string $themeType = '' ) : array | boolean Lookup the path to a JS file and return its info array
resourceHash ( array $resources ) : string Generate a hash for a group of resources, based on keys + versions
serveCss ( $themeType, $filename ) Serve all CSS files.
viewExtensions ( boolean $fresh = false ) : array Get list of allowed view extensions
viewHandlers ( boolean $fresh = false ) : array Get list of defined view handlers
viewLocation ( string $view, string $controller, string $folder, array | null $extensions = null ) : string | false Get the path to a view.

Méthodes protégées

Méthode Description
_comparePath ( $a, $b ) : integer Sorting callback

Method Details

_comparePath() protected méthode

Sorting callback
protected _comparePath ( $a, $b ) : integer
$a
$b
Résultat integer

addCssFile() public méthode

Add to the list of CSS files to serve.
public addCssFile ( $filename, boolean $folder = false, boolean $options = false )
$filename
$folder boolean
$options boolean

cssPath() public static méthode

Lookup the path to a CSS file and return its info array
public static cssPath ( string $filename, string $folder = '', string $themeType = '' ) : array | boolean
$filename string name/relative path to css file
$folder string optional. app or plugin folder to search
$themeType string mobile or desktop
Résultat array | boolean

eTag() public static méthode

Generate an e-tag for the application from the versions of all of its enabled applications/plugins.
public static eTag ( ) : string
Résultat string etag

getAnchors() public static méthode

Fires an event to allow loaded applications to create their own CSS aggregation domains.
public static getAnchors ( ) : array
Résultat array

getCssFiles() public méthode

public getCssFiles ( $themeType, $basename, $eTag, null &$notFound = null ) : array
$themeType
$basename
$eTag
$notFound null
Résultat array

jsPath() public static méthode

Lookup the path to a JS file and return its info array
public static jsPath ( string $filename, string $folder = '', string $themeType = '' ) : array | boolean
$filename string name/relative path to js file
$folder string optional. app or plugin folder to search
$themeType string mobile or desktop
Résultat array | boolean

resourceHash() public méthode

Generate a hash for a group of resources, based on keys + versions
public resourceHash ( array $resources ) : string
$resources array
Résultat string

serveCss() public méthode

Serve all CSS files.
public serveCss ( $themeType, $filename )
$themeType
$filename

viewExtensions() public static méthode

Get list of allowed view extensions
public static viewExtensions ( boolean $fresh = false ) : array
$fresh boolean
Résultat array list of extensions

viewHandlers() public static méthode

Get list of defined view handlers
public static viewHandlers ( boolean $fresh = false ) : array
$fresh boolean
Résultat array

viewLocation() public static méthode

Get the path to a view.
public static viewLocation ( string $view, string $controller, string $folder, array | null $extensions = null ) : string | false
$view string the name of the view.
$controller string the name of the controller invoking the view or blank.
$folder string the application folder or plugins/ folder.
$extensions array | null optional. list of extensions to allow
Résultat string | false The path to the view or false if it wasn't found.

Property Details

$UrlPrefix public_oe property

public string $UrlPrefix
Résultat string

$_CssFiles protected_oe property

List of CSS files to serve.
protected $_CssFiles