CompiledConfig
extends CompiledBase
in package
Class CompiledConfig
Table of Contents
Properties
- $checksum : string|bool
- $name : string
- $timestamp : int
- $version : int
- $cacheFolder : string
- $callable : callable
- $files : array<string|int, mixed>
- $object : mixed
- $path : string
- $withDefaults : bool
Methods
- __construct() : mixed
- CompiledConfig constructor.
- checksum() : bool|string
- Returns checksum from the configuration files.
- load() : mixed
- Load the configuration.
- modified() : void
- Function gets called when cached configuration is saved.
- name() : $this
- Get filename for the compiled PHP file.
- setBlueprints() : $this
- Set blueprints for the configuration.
- timestamp() : int
- Get timestamp of compiled configuration
- createFilename() : string
- createObject() : void
- Create configuration object.
- finalizeObject() : void
- Finalize configuration object.
- getState() : array<string|int, mixed>
- loadFile() : void
- Load single configuration file and append it to the correct position.
Properties
$checksum
public
string|bool
$checksum
Configuration checksum.
$name
public
string
$name
Filename (base name) of the compiled configuration.
$timestamp
public
int
$timestamp
= 0
Timestamp of compiled configuration
$version
public
int
$version
= 1
Version number for the compiled file.
$cacheFolder
protected
string
$cacheFolder
Cache folder to be used.
$callable
protected
callable
$callable
Blueprints loader.
$files
protected
array<string|int, mixed>
$files
List of files to load.
$object
protected
mixed
$object
Configuration object.
$path
protected
string
$path
$withDefaults
protected
bool
$withDefaults
= false
Methods
__construct()
CompiledConfig constructor.
public
__construct(string $cacheFolder, array<string|int, mixed> $files, string $path) : mixed
Parameters
- $cacheFolder : string
- $files : array<string|int, mixed>
- $path : string
checksum()
Returns checksum from the configuration files.
public
checksum() : bool|string
You can set $this->checksum = false to disable this check.
Return values
bool|stringload()
Load the configuration.
public
load([bool $withDefaults = false ]) : mixed
Parameters
- $withDefaults : bool = false
modified()
Function gets called when cached configuration is saved.
public
modified() : void
name()
Get filename for the compiled PHP file.
public
name([string|null $name = null ]) : $this
Parameters
- $name : string|null = null
Return values
$thissetBlueprints()
Set blueprints for the configuration.
public
setBlueprints(callable $blueprints) : $this
Parameters
- $blueprints : callable
Return values
$thistimestamp()
Get timestamp of compiled configuration
public
timestamp() : int
Return values
int —Timestamp of compiled configuration
createFilename()
protected
createFilename() : string
Return values
stringcreateObject()
Create configuration object.
protected
createObject([array<string|int, mixed> $data = [] ]) : void
Parameters
- $data : array<string|int, mixed> = []
finalizeObject()
Finalize configuration object.
protected
finalizeObject() : void
getState()
protected
getState() : array<string|int, mixed>
Return values
array<string|int, mixed>loadFile()
Load single configuration file and append it to the correct position.
protected
loadFile(string $name, string $filename) : void
Parameters
- $name : string
-
Name of the position.
- $filename : string
-
File to be loaded.