class YamlDiscovery extends YamlDiscovery (View source)

Provides discovery for YAML files within a given set of directories.

This overrides the Component file decoding with the Core YAML implementation.

Properties

protected string $name

The base filename to look for in each directory.

from  YamlDiscovery
protected array $directories

An array of directories to scan, keyed by the provider.

from  YamlDiscovery

Methods

__construct(string $name, array $directories)

Constructs a YamlDiscovery object.

array
findAll()

Returns an array of discoverable items.

array
decode(string $file)

Decode a YAML file.

array
findFiles()

Returns an array of file paths, keyed by provider.

Details

__construct(string $name, array $directories)

Constructs a YamlDiscovery object.

Parameters

string $name

The base filename to look for in each directory. The format will be $provider.$name.yml.

array $directories

An array of directories to scan, keyed by the provider.

array findAll()

Returns an array of discoverable items.

Return Value

array

An array of discovered data keyed by provider.

Exceptions

DiscoveryException

protected array decode(string $file)

Decode a YAML file.

Parameters

string $file

Yaml file path.

Return Value

array

protected array findFiles()

Returns an array of file paths, keyed by provider.

Return Value

array