YamlSource

Configuration source based on YAML files

Scope: frontend / backend

Internal

Table of Contents

Properties

$filePersistenceSlot  : FilePersistenceSlot

Methods

injectFilePersistenceSlot()  : mixed
load()  : array
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
Load YAML configuration from a FAL file
loadFromFilePath()  : array
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 $filesToLoad) : array
Parameters
$filesToLoad : array
Internal
Return values
array

save()

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

public save(File|string $fileToSave, array $configuration) : mixed
Parameters
$fileToSave : File|string

The file to write to.

$configuration : array

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
Parameters
$filePath : string
Tags
throws
ParseErrorException
Return values
array
On this page

Search results