Class ConfigLoader
Yii CDN Configuration File Loader
Methods summary
public
|
#
__construct( array $config = [] )
Constructor function
Parameters
- $config
- (optional) Default configuration
|
protected
yii2cdn\ConfigLoader
|
#
appendWithFromFile( string $path )
Append config using file path
Append config using file path
Parameters
Returns
Throws
yii\base\InvalidConfigException When file not found
yii\base\InvalidConfigException When file is unreadable
|
public
yii2cdn\ConfigLoader
|
#
appendWith( array $config = [] )
Append array with current config
Append array with current config
Parameters
Returns
|
public
yii2cdn\ConfigLoader
|
#
offline( string $path )
Load a configuration file only when offline mode is active
Load a configuration file only when offline mode is active
Parameters
- $path
- CDN config file path
Returns
|
public
yii2cdn\ConfigLoader
|
#
online( string $path )
Load a configuration file
Load a configuration file
Parameters
- $path
- CDN config file path
Returns
|
public
|
#
loadConfig( array $filesPath )
Load a files list and merge with configuration
Usage:
1. '...' : main file path
2. ['...'] : main file path
3. ['...', 'offline'=false] : online cdn file path
4. ['...', 'offline'=true] : offline cdn file path
Load a files list and merge with configuration
Usage: 1. '...' : main file path 2. ['...'] : main file path 3. ['...', 'offline'=false] : online cdn file path 4. ['...', 'offline'=true] : offline cdn file path
Parameters
- $filesPath
- Config files list
Throws
InvalidArgumentException
|
public
array
|
#
asArray( )
Get configuration object as array
Get configuration object as array
Returns
array
|