class Liaison extends Liaison (View source)

A repository stand-in that allows for accessing a site's config

Properties

protected Repository $repository from  Liaison
protected string $default_namespace

Default Namespace.

from  Liaison
protected $site

Methods

__construct(Repository $repository, Site $site)

Create a new configuration repository.

bool
has(string $key)

No description

from  Liaison
mixed
get(string $key, mixed $default = null)

No description

from  Liaison
bool
save(string $key, mixed $value)

No description

from  Liaison
set(string $key, mixed $value)

No description

from  Liaison
clear($key)

No description

from  Liaison
getRepository()

No description

from  Liaison
setRepository(Repository $repository)

No description

from  Liaison
string
getDefaultNamespace()

No description

from  Liaison
setDefaultNamespace(string $default_namespace)

No description

from  Liaison
mixed
withKey(string $key, mixed $value, callable $callable)

Execute a callable using a specific key value.

from  Liaison
string
transformKey($key)

Prepend the "site" config group and the current site handle

Details

__construct(Repository $repository, Site $site)

Create a new configuration repository.

Parameters

Repository $repository
Site $site

bool has(string $key)

No description

Parameters

string $key

Return Value

bool

mixed get(string $key, mixed $default = null)

No description

Parameters

string $key
mixed $default

Return Value

mixed

bool save(string $key, mixed $value)

No description

Parameters

string $key
mixed $value

Return Value

bool

set(string $key, mixed $value)

No description

Parameters

string $key
mixed $value

clear($key)

No description

Parameters

$key

Repository getRepository()

No description

Return Value

Repository

setRepository(Repository $repository)

No description

Parameters

Repository $repository

string getDefaultNamespace()

No description

Return Value

string

setDefaultNamespace(string $default_namespace)

No description

Parameters

string $default_namespace

mixed withKey(string $key, mixed $value, callable $callable)

Execute a callable using a specific key value.

Parameters

string $key
mixed $value
callable $callable

Return Value

mixed

returns the result of $callable

protected string transformKey($key)

Prepend the "site" config group and the current site handle

Parameters

$key

Return Value

string