Options
in package
implements
OptionsInterface
Manages Predis options with filtering, conversion and lazy initialization of values using a mini-DI container approach.
Tags
Interfaces, Classes and Traits
- OptionsInterface
- Interface defining a container for client options.
Table of Contents
- $handlers : mixed
- $input : mixed
- $options : mixed
- __construct() : mixed
- __get() : mixed|null
- Returns the value of the given option.
- __isset() : bool
- Checks if the given option has been set and does not evaluate to NULL.
- defined() : bool
- Checks if the given option has been set by the user upon initialization.
- getDefault() : mixed|null
- Returns the default value for the given option.
- getHandlers() : array<string|int, mixed>
- Ensures that the default options are initialized.
Properties
$handlers
protected
mixed
$handlers
$input
protected
mixed
$input
$options
protected
mixed
$options
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
-
Array of options with their values
Return values
mixed —__get()
Returns the value of the given option.
public
__get(mixed $option) : mixed|null
Parameters
- $option : mixed
-
Name of the option.
Return values
mixed|null —__isset()
Checks if the given option has been set and does not evaluate to NULL.
public
__isset(mixed $option) : bool
Parameters
- $option : mixed
-
Name of the option.
Return values
bool —defined()
Checks if the given option has been set by the user upon initialization.
public
defined(mixed $option) : bool
Parameters
- $option : mixed
-
Name of the option.
Return values
bool —getDefault()
Returns the default value for the given option.
public
getDefault(mixed $option) : mixed|null
Parameters
- $option : mixed
-
Name of the option.
Return values
mixed|null —getHandlers()
Ensures that the default options are initialized.
protected
getHandlers() : array<string|int, mixed>