class AbstractYamlReader (View source)

Properties

static protected AbstractYamlReader[] $instances
protected string $filename Path to file to parse

Methods

__construct(string $filename)

Use singleton, instead of calling new Options(), use Options::instance()

mixed
loadYaml(string $filename)

No description

instance(string $filename = null)

No description

array
parseSimpleArray(string $filename, string $mainKey)

No description

static 
resetInstances()

For tests purpose only!

Details

abstract protected __construct(string $filename)

Use singleton, instead of calling new Options(), use Options::instance()

Parameters

string $filename options's file to parse

protected mixed loadYaml(string $filename)

Parameters

string $filename

Return Value

mixed

static AbstractYamlReader instance(string $filename = null)

Parameters

string $filename options's file to parse

Return Value

AbstractYamlReader

Exceptions

InvalidArgumentException

protected array parseSimpleArray(string $filename, string $mainKey)

Parameters

string $filename
string $mainKey

Return Value

array

Exceptions

InvalidArgumentException

static resetInstances()

For tests purpose only!