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)

No description

Details

__construct(Repository $repository, Site $site)

Create a new configuration repository.

Parameters

Repository $repository
Site $site

bool has(string $key)

Parameters

string $key

Return Value

bool

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

Parameters

string $key
mixed $default

Return Value

mixed

bool save(string $key, mixed $value)

Parameters

string $key
mixed $value

Return Value

bool

set(string $key, mixed $value)

Parameters

string $key
mixed $value

clear($key)

Parameters

$key

Repository getRepository()

Return Value

Repository

setRepository(Repository $repository)

Parameters

Repository $repository

string getDefaultNamespace()

Return Value

string

setDefaultNamespace(string $default_namespace)

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)

Parameters

$key

Return Value

string