- Full name:
\App\Infrastructure\Services\Options - This class is marked as final and can't be subclassed
- This class is a Final class
Properties
dfdb
cache
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$dfdb |
\Qubus\Expressive\Database | |
$cache |
\Psr\SimpleCache\CacheInterface |
factory
-
This method is static. Throws:
NotFoundExceptionInterfaceReflectionExceptionTypeException
create
Add an option to the table.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name |
string | |
$value |
mixed |
Throws:
read
Read an option from options_meta.
Return value or $default if not found.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$optionKey |
mixed | |
$default |
mixed |
Throws:
update
Update (add if it doesn't exist) an option to option's table.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$optionKey |
string | |
$newvalue |
mixed |
Throws:
delete
Delete an option from the table.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name |
string |
Throws:
massUpdate
Update an array of options to the option's table.
Best to validate the data array first before running this method.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$options |
array |
Throws:
exists
Checks if a key exists in the option table.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$optionKey |
string | Key to check against. |