YamlSource

Configuration source based on YAML files

Scope: frontend / backend

Internal

Table of Contents

Properties

$filePersistenceSlot  : FilePersistenceSlot

Methods

injectFilePersistenceSlot()  : mixed
load()  : array<string|int, mixed>
Loads the specified configuration files and returns its merged content as an array.
save()  : mixed
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

Properties

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) : mixed
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

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