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<string|int, 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<string|int, mixed>
Parameters
$resource : mixed

The resource

$type : string|null = null

The resource type

Tags
throws
ConfigurationBuilderException

If an error occurs while reading the file.

throws
ParseException

If something goes wrong in parsing the file.

psalm-suppress

PossiblyInvalidArgument FileLocator::locate() returns string, since 3rd argument isn't false

Return values
array<string|int, mixed>

supports()

Returns true if this class supports the given resource.

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

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

Parameters
$resource : mixed

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