PHP Class App\Services\Repositories\OptionRepository

Inheritance: extends Repository
Afficher le fichier Open project: printempw/blessing-skin-server Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) : void Create a new option repository.
__destruct ( ) Save all modified options into database
get ( string $key, mixed $default = null, boolean $bool = true ) : mixed Get the specified option value.
only ( array $array ) : array Return the options with key in the given array.
prepend ( string $key, mixed $value ) : void Prepend a value onto an array option value.
save ( ) : void Do really save modified options to database.

Method Details

__construct() public méthode

Create a new option repository.
public __construct ( ) : void
Résultat void

__destruct() public méthode

Save all modified options into database
public __destruct ( )

get() public méthode

Get the specified option value.
public get ( string $key, mixed $default = null, boolean $bool = true ) : mixed
$key string
$default mixed
$bool boolean convert '0', '1' to bool value
Résultat mixed

only() public méthode

Return the options with key in the given array.
public only ( array $array ) : array
$array array
Résultat array

prepend() public méthode

Prepend a value onto an array option value.
public prepend ( string $key, mixed $value ) : void
$key string
$value mixed
Résultat void

save() public méthode

Do really save modified options to database.
public save ( ) : void
Résultat void