Свойство | Type | Description | |
---|---|---|---|
$_data | array | Parsed configuration data. | |
$_defaults | array | These defaults are used unless a key is redefined. | |
$_extensionTypes | array | handle. | |
$_filters | array | Filter configuration | |
$_modifiedTime | integer | The max modified time of all the config files loaded. | |
$_targets | array | Target configuration | |
$constantMap | array | A hash of constants that can be expanded when reading ini files. |
Méthode | Description | |
---|---|---|
__construct ( array $data = [], array $constants = [] ) | Constructor, set some initial data for a AssetConfig object. | |
addExtension ( string $ext, array $config ) : void | Add/Replace an extension configuration. | |
addTarget ( string $target, array $config ) | Create a new build target. | |
allFilters ( ) : array | Get configuration for all filters. | |
buildFromIniFile ( string $iniFile = null, $constants = [] ) | Factory method | |
cachePath ( string $ext, string $path = null ) | Accessor for getting the cachePath for a given extension. | |
constants ( ) : array | Get the list of loaded constants. | |
extensions ( ) : array | Get the list of extensions this config object supports. | |
files ( string $target ) : array | Get the list of files that match the given build file. | |
filterConfig ( string $filter, array $settings = null ) : mixed. | Get/Set filter Settings. | |
filters ( string $ext, array $filters = null ) : array | Get/set filters for an extension | |
general ( string $key, mixed $value = null ) : mixed | Get / set values from the General section. This is preferred to using get()/set() as you don't run the risk of making a mistake in General's casing. | |
get ( string $path ) | Get values from the config data. | |
getExt ( string $file ) : string | Get the extension for a filename. | |
hasTarget ( string $name ) : boolean | Check if the named target exists. | |
isThemed ( string $target ) : boolean | Check if a build target is themed. | |
load ( string $path, string $prefix = '' ) | Load a config file into the current instance. | |
modifiedTime ( ) : integer | Get the modified time of the loaded configuration files. | |
paths ( string $ext, string $target = null, array $paths = null ) : array | Get/set paths for an extension. Setting paths will replace global or per target existing paths. Its only intended for testing. | |
requires ( string $target ) : array | Get the required build targets for this target. | |
set ( string $path, string $value ) | Set values into the config object, You can't modify targets, or filters with this. Use the appropriate methods for those settings. | |
targetFilters ( string $name ) : array | Get the filters for a build target. | |
targets ( ) : array | Get the build targets. | |
theme ( string $theme = null ) : mixed | Set the active theme for building assets. |
Méthode | Description | |
---|---|---|
_addConstants ( array $constants ) : void | Add path based constants to the mapped constants. | |
_parseExtensionDef ( $target ) : array | Parses paths in an extension definition | |
_replacePathConstants ( string $path ) : string | Replaces the file path constants used in Config files. | |
readConfig ( string $filename ) : array | Read the configuration file from disk | |
resolveExtends ( ) : void | Once all targets have been built, resolve extend options. |
public __construct ( array $data = [], array $constants = [] ) | ||
$data | array | Initial data set for the object. |
$constants | array | Additional constants that will be translated when parsing paths. |
protected _addConstants ( array $constants ) : void | ||
$constants | array | The constants to map |
Résultat | void |
protected _parseExtensionDef ( $target ) : array | ||
Résultat | array | Array of build extension information with paths replaced. |
protected _replacePathConstants ( string $path ) : string | ||
$path | string | Path to replace constants on |
Résultat | string | constants replaced |
public allFilters ( ) : array | ||
Résultat | array | Config data related to all filters. |
public static buildFromIniFile ( string $iniFile = null, $constants = [] ) | ||
$iniFile | string | File path for the ini file to parse. |
public extensions ( ) : array | ||
Résultat | array | Extension list. |
public filterConfig ( string $filter, array $settings = null ) : mixed. | ||
$filter | string | The filter name |
$settings | array | The settings to set, leave null to get |
Résultat | mixed. |
public modifiedTime ( ) : integer | ||
Résultat | integer |
public paths ( string $ext, string $target = null, array $paths = null ) : array | ||
$ext | string | Extension to get paths for. |
$target | string | A build target. If provided the target's paths (if any) will also be returned. |
$paths | array | Paths to replace either the global or per target paths. |
Résultat | array | An array of paths to search for assets on. |
protected readConfig ( string $filename ) : array | ||
$filename | string | Name of the inifile to parse |
Résultat | array | Inifile contents |
protected resolveExtends ( ) : void | ||
Résultat | void |
public targetFilters ( string $name ) : array | ||
$name | string | The build target to get filters for. |
Résultat | array |
protected static array $_defaults | ||
Résultat | array |
protected static array $_extensionTypes | ||
Résultat | array |
protected int $_modifiedTime | ||
Résultat | integer |
protected array $constantMap | ||
Résultat | array |