Documentation

CompiledBase
in package

AbstractYes

Class CompiledBase

Table of Contents

Properties

$checksum  : string|bool
$name  : string
$timestamp  : int
$version  : int
$cacheFolder  : string
$files  : array<string|int, mixed>
$object  : mixed
$path  : string

Methods

__construct()  : mixed
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.
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.

$files

protected array<string|int, mixed> $files

List of files to load.

Methods

__construct()

public __construct(string $cacheFolder, array<string|int, mixed> $files, string $path) : mixed
Parameters
$cacheFolder : string

Cache folder to be used.

$files : array<string|int, mixed>

List of files as returned from ConfigFileFinder class.

$path : string

Base path for the file list.

Tags
throws
BadMethodCallException

checksum()

Returns checksum from the configuration files.

public checksum() : bool|string

You can set $this->checksum = false to disable this check.

Return values
bool|string

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
$this

timestamp()

Get timestamp of compiled configuration

public timestamp() : int
Return values
int

Timestamp of compiled configuration

createFilename()

protected createFilename() : string
Return values
string

createObject()

Create configuration object.

protected abstract createObject([array<string|int, mixed> $data = [] ]) : void
Parameters
$data : array<string|int, mixed> = []

finalizeObject()

Finalize configuration object.

protected abstract 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 abstract loadFile(string $name, string|array<string|int, string> $filename) : void
Parameters
$name : string

Name of the position.

$filename : string|array<string|int, string>

File(s) to be loaded.


        
On this page

Search results