interface OptionsInterface

Options interface

Methods

void
setStorageAdapter(OptionsStorageInterface $adapter)

Set storage adapter

bool
createOption(string $key, mixed $value, bool $autoLoad = false, string|null $extension = null)

Create option, if option exists return false

bool
set(string $key, mixed $value, string|null $extension = null)

Save option

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

Get option

bool
has(string $key)

Return true if option name exist

bool
removeOptions(string $key = null, string|null $extension = null)

Remove option(s)

array
searchOptions(string $searchKey, bool $compactKeys = false)

Search options

mixed
getExtensionOptions(string $extensioName)

Get extension options

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

Force load option

Details

at line 25
void setStorageAdapter(OptionsStorageInterface $adapter)

Set storage adapter

Parameters

OptionsStorageInterface $adapter

Return Value

void

at line 36
bool createOption(string $key, mixed $value, bool $autoLoad = false, string|null $extension = null)

Create option, if option exists return false

Parameters

string $key
mixed $value
bool $autoLoad
string|null $extension

Return Value

bool

at line 46
bool set(string $key, mixed $value, string|null $extension = null)

Save option

Parameters

string $key
mixed $value
string|null $extension

Return Value

bool

at line 55
mixed get(string $key, mixed $default = null)

Get option

Parameters

string $key
mixed $default

Return Value

mixed

at line 63
bool has(string $key)

Return true if option name exist

Parameters

string $key

Return Value

bool

at line 72
bool removeOptions(string $key = null, string|null $extension = null)

Remove option(s)

Parameters

string $key
string|null $extension

Return Value

bool

at line 81
array searchOptions(string $searchKey, bool $compactKeys = false)

Search options

Parameters

string $searchKey
bool $compactKeys

Return Value

array

at line 89
mixed getExtensionOptions(string $extensioName)

Get extension options

Parameters

string $extensioName

Return Value

mixed

at line 98
mixed read(string $key, mixed $default = null)

Force load option

Parameters

string $key
mixed $default

Return Value

mixed