Documentation

YamlFileLoader extends FileLoader
in package

YamlFileLoader loads configuration parameters from yaml file.

Tags
author

Cristiano Cinotti cristianocinotti@gmail.com

Table of Contents

Methods

load()  : array<int|string, mixed>
Loads a Yaml file.
supports()  : bool
Returns true if this class supports the given resource.

Methods

load()

Loads a Yaml file.

public load(mixed $resource[, string|null $type = null ]) : array<int|string, mixed>
Parameters
$resource : mixed

The resource

$type : string|null = null

The resource type

Tags
throws
ConfigurationBuilderException

If an error occurs while reading the file.

ParseException

If something goes wrong in parsing the file.

Return values
array<int|string, mixed>

supports()

Returns true if this class supports the given resource.

public supports(string $resource[, string|null $type = null ]) : bool

Both 'yml' and 'yaml' extensions are accepted.

Parameters
$resource : string

A resource.

$type : string|null = null

The resource type.

Return values
bool —

true If this class supports the given resource, false otherwise.

On this page

Search results