PluginOptions
extends AbstractOptions
in package
Table of Contents
- $__strictMode__ : bool
- We use the __ prefix to avoid collisions with properties in user-implementations.
- $clearingFactor : int
- Used by: - ClearByFactor
- $exceptionCallback : null|callable
- Used by: - ExceptionHandler
- $exitOnAbort : bool
- Used by: - IgnoreUserAbort
- $optimizingFactor : int
- Used by: - OptimizeByFactor
- $serializer : string|AdapterInterface
- Used by: - Serializer
- $serializerOptions : array<string|int, mixed>
- Used by: - Serializer
- $throwExceptions : bool
- Used by: - ExceptionHandler
- __construct() : mixed
- Constructor
- __get() : mixed
- Get a configuration property
- __isset() : bool
- Test if a configuration property is null
- __set() : void
- Set a configuration property
- __unset() : void
- Set a configuration property to NULL
- getClearingFactor() : int
- Get automatic clearing factor
- getExceptionCallback() : null|callable
- Get callback to call on intercepted exception
- getExitOnAbort() : bool
- Exit if connection aborted and ignore_user_abort is disabled.
- getOptimizingFactor() : int
- Set automatic optimizing factor
- getSerializer() : AdapterInterface
- Get serializer
- getSerializerOptions() : array<string|int, mixed>
- Get configuration options for instantiating a serializer adapter
- getThrowExceptions() : bool
- Should we re-throw exceptions?
- setClearingFactor() : PluginOptions
- Set automatic clearing factor
- setExceptionCallback() : PluginOptions
- Set callback to call on intercepted exception
- setExitOnAbort() : PluginOptions
- Exit if connection aborted and ignore_user_abort is disabled.
- setFromArray() : AbstractOptions
- Set one or more configuration properties
- setOptimizingFactor() : PluginOptions
- Set automatic optimizing factor
- setSerializer() : PluginOptions
- Set serializer
- setSerializerOptions() : PluginOptions
- Set configuration options for instantiating a serializer adapter
- setThrowExceptions() : PluginOptions
- Set flag indicating we should re-throw exceptions
- toArray() : array<string|int, mixed>
- Cast to array
- normalizeFactor() : int
- Normalize a factor
Properties
$__strictMode__
We use the __ prefix to avoid collisions with properties in user-implementations.
protected
bool
$__strictMode__
= true
$clearingFactor
Used by: - ClearByFactor
protected
int
$clearingFactor
= 0
$exceptionCallback
Used by: - ExceptionHandler
protected
null|callable
$exceptionCallback
$exitOnAbort
Used by: - IgnoreUserAbort
protected
bool
$exitOnAbort
= true
$optimizingFactor
Used by: - OptimizeByFactor
protected
int
$optimizingFactor
= 0
$serializer
Used by: - Serializer
protected
string|AdapterInterface
$serializer
$serializerOptions
Used by: - Serializer
protected
array<string|int, mixed>
$serializerOptions
= []
$throwExceptions
Used by: - ExceptionHandler
protected
bool
$throwExceptions
= true
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|Traversable|null $options = null ]) : mixed
Parameters
- $options : array<string|int, mixed>|Traversable|null = null
Return values
mixed —__get()
Get a configuration property
public
__get(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —__isset()
Test if a configuration property is null
public
__isset(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —__set()
Set a configuration property
public
__set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
Tags
Return values
void —__unset()
Set a configuration property to NULL
public
__unset(string $key) : void
Parameters
- $key : string
Tags
Return values
void —getClearingFactor()
Get automatic clearing factor
public
getClearingFactor() : int
Used by:
- ClearExpiredByFactor
Return values
int —getExceptionCallback()
Get callback to call on intercepted exception
public
getExceptionCallback() : null|callable
Used by:
- ExceptionHandler
Return values
null|callable —getExitOnAbort()
Exit if connection aborted and ignore_user_abort is disabled.
public
getExitOnAbort() : bool
Return values
bool —getOptimizingFactor()
Set automatic optimizing factor
public
getOptimizingFactor() : int
Used by:
- OptimizeByFactor
Return values
int —getSerializer()
Get serializer
public
getSerializer() : AdapterInterface
Used by:
- Serializer
Return values
AdapterInterface —getSerializerOptions()
Get configuration options for instantiating a serializer adapter
public
getSerializerOptions() : array<string|int, mixed>
Used by:
- Serializer
Return values
array<string|int, mixed> —getThrowExceptions()
Should we re-throw exceptions?
public
getThrowExceptions() : bool
Used by:
- ExceptionHandler
Return values
bool —setClearingFactor()
Set automatic clearing factor
public
setClearingFactor(int $clearingFactor) : PluginOptions
Used by:
- ClearExpiredByFactor
Parameters
- $clearingFactor : int
Return values
PluginOptions —Provides a fluent interface
setExceptionCallback()
Set callback to call on intercepted exception
public
setExceptionCallback(null|callable $exceptionCallback) : PluginOptions
Used by:
- ExceptionHandler
Parameters
- $exceptionCallback : null|callable
Tags
Return values
PluginOptions —Provides a fluent interface
setExitOnAbort()
Exit if connection aborted and ignore_user_abort is disabled.
public
setExitOnAbort(bool $exitOnAbort) : PluginOptions
Parameters
- $exitOnAbort : bool
Return values
PluginOptions —Provides a fluent interface
setFromArray()
Set one or more configuration properties
public
setFromArray(array<string|int, mixed>|Traversable|AbstractOptions $options) : AbstractOptions
Parameters
- $options : array<string|int, mixed>|Traversable|AbstractOptions
Tags
Return values
AbstractOptions —Provides fluent interface
setOptimizingFactor()
Set automatic optimizing factor
public
setOptimizingFactor(int $optimizingFactor) : PluginOptions
Used by:
- OptimizeByFactor
Parameters
- $optimizingFactor : int
Return values
PluginOptions —Provides a fluent interface
setSerializer()
Set serializer
public
setSerializer(string|AdapterInterface $serializer) : PluginOptions
Used by:
- Serializer
Parameters
- $serializer : string|AdapterInterface
Tags
Return values
PluginOptions —Provides a fluent interface
setSerializerOptions()
Set configuration options for instantiating a serializer adapter
public
setSerializerOptions(mixed $serializerOptions) : PluginOptions
Used by:
- Serializer
Parameters
- $serializerOptions : mixed
Return values
PluginOptions —Provides a fluent interface
setThrowExceptions()
Set flag indicating we should re-throw exceptions
public
setThrowExceptions(bool $throwExceptions) : PluginOptions
Used by:
- ExceptionHandler
Parameters
- $throwExceptions : bool
Return values
PluginOptions —Provides a fluent interface
toArray()
Cast to array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —normalizeFactor()
Normalize a factor
protected
normalizeFactor(int $factor) : int
Cast to int and ensure we have a value greater than zero.
Parameters
- $factor : int