Yaml
in package
implements
ISettingSource
.yaml based setting source.
Table of Contents
Interfaces
- ISettingSource
- Access to setting based services.
Properties
- $fs : IFileSystem
- $settings : array<string|int, mixed>
Methods
- __construct() : mixed
- get() : mixed
- getSection() : array<string|int, mixed>|null
- Get entire section as an array
- getSectionNames() : array<string|int, mixed>
- getSectionSettingNames() : array<string|int, mixed>
- save() : bool
- set() : ISettingSource
Properties
$fs
private
IFileSystem
$fs
$settings
private
array<string|int, mixed>
$settings
= array()
Methods
__construct()
public
__construct(string $file[, IFileSystem|null $fs = null ]) : mixed
Parameters
- $file : string
-
Path to YAML file
- $fs : IFileSystem|null = null
-
File system implementation (null = use real file system)
Tags
get()
public
get(string $sectionName, string $name) : mixed
Parameters
- $sectionName : string
- $name : string
getSection()
Get entire section as an array
public
getSection(string $sectionName) : array<string|int, mixed>|null
Parameters
- $sectionName : string
Return values
array<string|int, mixed>|nullgetSectionNames()
public
getSectionNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getSectionSettingNames()
public
getSectionSettingNames(string $section) : array<string|int, mixed>
Parameters
- $section : string
Return values
array<string|int, mixed>save()
public
save() : bool
Return values
boolset()
public
set(string $sectionName, string $name, mixed $value) : ISettingSource
Parameters
- $sectionName : string
- $name : string
- $value : mixed