OptionsInterface
interface OptionsInterface
Options interface
Methods
void
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
at line 36
bool
createOption(string $key, mixed $value, bool $autoLoad = false, string|null $extension = null)
Create option, if option exists return false
at line 46
bool
set(string $key, mixed $value, string|null $extension = null)
Save option
at line 55
mixed
get(string $key, mixed $default = null)
Get option
at line 63
bool
has(string $key)
Return true if option name exist
at line 72
bool
removeOptions(string $key = null, string|null $extension = null)
Remove option(s)
at line 81
array
searchOptions(string $searchKey, bool $compactKeys = false)
Search options
at line 89
mixed
getExtensionOptions(string $extensioName)
Get extension options
at line 98
mixed
read(string $key, mixed $default = null)
Force load option