interface MutableConfigCollectionInterface implements ConfigCollectionInterface (View source)

Methods

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

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

public
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

public
array
getMetadata()

Returns the entire metadata

public
getHistory()

No description

public
nest()

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

public
getMiddlewares()

No description

public
$this
setMiddlewares(Middleware[] $middlewares)

No description

public
$this
addMiddleware(Middleware $middleware)

No description

public
array
getAll()

Get complete config (excludes middleware)

public
$this
set(string $class, string $name, mixed $value, array $metadata = [])

Sets config for a given field.

public
$this
merge(string $class, string $name, mixed $value)

Merge a config for a class, or a field on that class

public
$this
remove(string $class, string $name = null)

Remove config for a given class, or field on that class

public
removeAll()

Delete all entries

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()

No description

ConfigCollectionInterface nest()

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

Middleware[] getMiddlewares()

No description

Return Value

Middleware[]

$this setMiddlewares(Middleware[] $middlewares)

No description

Parameters

Middleware[] $middlewares

Return Value

$this

$this addMiddleware(Middleware $middleware)

No description

Parameters

Middleware $middleware

Return Value

$this

array getAll()

Get complete config (excludes middleware)

Return Value

array

$this set(string $class, string $name, mixed $value, array $metadata = [])

Sets config for a given field.

Set name to null to set the config for the entire class.

Parameters

string $class
string $name
mixed $value
array $metadata

Return Value

$this

$this merge(string $class, string $name, mixed $value)

Merge a config for a class, or a field on that class

Parameters

string $class
string $name
mixed $value

Return Value

$this

$this remove(string $class, string $name = null)

Remove config for a given class, or field on that class

Parameters

string $class
string $name

Return Value

$this

removeAll()

Delete all entries