YamlSource

Read onlyYes

Configuration source based on YAML files

Scope: frontend / backend

Internal

Table of Contents

Methods

__construct()  : mixed
load()  : array<string|int, mixed>
Loads the specified configuration files and returns its merged content as an array.
save()  : void
Save the specified configuration array to the given file in YAML format.
buildCombinedIdentifier()  : string
getHeaderFromFile()  : string
Read the header part from the given file. That means, every line until the first non comment line is found.
loadFromFile()  : array<string|int, mixed>
Load YAML configuration from a FAL file
loadFromFilePath()  : array<string|int, mixed>
Load YAML configuration from a local file path

Methods

load()

Loads the specified configuration files and returns its merged content as an array.

public load(array<string|int, mixed> $filesToLoad) : array<string|int, mixed>
Parameters
$filesToLoad : array<string|int, mixed>
Internal
Return values
array<string|int, mixed>

save()

Save the specified configuration array to the given file in YAML format.

public save(File|string $fileToSave, array<string|int, mixed> $configuration) : void
Parameters
$fileToSave : File|string

The file to write to.

$configuration : array<string|int, mixed>

The configuration to save

Internal
Tags
throws
FileWriteException

if the file could not be written

getHeaderFromFile()

Read the header part from the given file. That means, every line until the first non comment line is found.

protected getHeaderFromFile(File|string $file) : string
Parameters
$file : File|string
Return values
string

The header of the given YAML file

loadFromFile()

Load YAML configuration from a FAL file

protected loadFromFile(File $file) : array<string|int, mixed>
Parameters
$file : File
Tags
throws
ParseErrorException
Return values
array<string|int, mixed>

loadFromFilePath()

Load YAML configuration from a local file path

protected loadFromFilePath(string $filePath) : array<string|int, mixed>
Parameters
$filePath : string
Tags
throws
ParseErrorException
Return values
array<string|int, mixed>

        
On this page

Search results