interface ConfigCollectionInterface (View source)

This represents a collection of config keys and values.

Methods

mixed
get(string $class, string $name = null, int|true $excludeMiddleware = 0)

Fetches value for a class, or a property on that class

bool
exists(string $class, string $name = null, int|true $excludeMiddleware = 0)

Checks to see if a config item exists, or a property on that class

array
getMetadata()

Returns the entire metadata

getHistory()

No description

nest()

Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.

getMiddlewares()

No description

$this
setMiddlewares(Middleware[] $middlewares)

No description

$this
addMiddleware(Middleware $middleware)

No description

array
getAll()

Get complete config (excludes middleware)

Details

mixed get(string $class, string $name = null, int|true $excludeMiddleware = 0)

Fetches value for a class, or a property on that class

Parameters

string $class

Class name to retrieve config for

string $name

Optional class property to get

int|true $excludeMiddleware

Optional flag of middleware to disable. Passing in true disables all middleware. Can also pass in int flags to specify specific middlewares.

Return Value

mixed

bool exists(string $class, string $name = null, int|true $excludeMiddleware = 0)

Checks to see if a config item exists, or a property on that class

Parameters

string $class

Class name to check config for

string $name

Optional class property to restrict check to

int|true $excludeMiddleware

Optional flag of middleware to disable. Passing in true disables all middleware. Can also pass in int flags to specify specific middlewares.

Return Value

bool

array getMetadata()

Returns the entire metadata

Return Value

array

getHistory()

ConfigCollectionInterface nest()

Get nested version of this config, which is normally duplicated version of this config, but could be a subclass.

Middleware[] getMiddlewares()

Return Value

Middleware[]

$this setMiddlewares(Middleware[] $middlewares)

Parameters

Middleware[] $middlewares

Return Value

$this

$this addMiddleware(Middleware $middleware)

Parameters

Middleware $middleware

Return Value

$this

array getAll()

Get complete config (excludes middleware)

Return Value

array