Arikaim CMS

Options extends Model
in package
implements OptionsStorageInterface

Options database model

Table of Contents

Interfaces

OptionsStorageInterface
Options interface

Properties

$timestamps  : bool
Disable timestamps
$fillable  : array<string|int, mixed>
Fillable attributes
$table  : string
Db table name

Methods

createOption()  : bool
Create option, if option exists return false
getExtensionOptions()  : mixed
Get extension options
hasOption()  : bool
Return true if option name exist
loadOptions()  : array<string|int, mixed>
Load options
read()  : mixed|null
Read option
remove()  : bool
Remove option
saveOption()  : bool
Save option
searchOptions()  : array<string|int, mixed>
Search for options

Properties

$timestamps

Disable timestamps

public bool $timestamps = false

$fillable

Fillable attributes

protected array<string|int, mixed> $fillable = ['key', 'value', 'auto_load', 'extension']

$table

Db table name

protected string $table = 'options'

Methods

createOption()

Create option, if option exists return false

public createOption(string $key, mixed $value[, bool $autoLoad = false ][, string|null $extension = null ]) : bool
Parameters
$key : string
$value : mixed
$autoLoad : bool = false
$extension : string|null = null
Return values
bool

getExtensionOptions()

Get extension options

public getExtensionOptions(string $extensioName) : mixed
Parameters
$extensioName : string

hasOption()

Return true if option name exist

public hasOption(string $key) : bool
Parameters
$key : string
Return values
bool

loadOptions()

Load options

public loadOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

read()

Read option

public read(string $key[, mixed $default = null ]) : mixed|null
Parameters
$key : string
$default : mixed = null
Return values
mixed|null

remove()

Remove option

public remove([string|null $key = null ][, string|null $extension = null ]) : bool
Parameters
$key : string|null = null
$extension : string|null = null
Return values
bool

saveOption()

Save option

public saveOption(string $key, mixed $value[, string $extension = null ][, bool $autoLoad = false ]) : bool
Parameters
$key : string
$value : mixed
$extension : string = null
$autoLoad : bool = false
Return values
bool

searchOptions()

Search for options

public searchOptions(string|null $searchKey[, bool $compactKeys = false ]) : array<string|int, mixed>
Parameters
$searchKey : string|null
$compactKeys : bool = false
Return values
array<string|int, mixed>

        
On this page

Search results