IntegerRepository
class IntegerRepository
Traits
Properties
| protected int|null | $data | The repository value. |
Methods
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
from
Conditionable
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
from
Conditionable
__construct(int|null $value = null)
Create an integer repository.
set(int|null $value)
Set the repository value.
int|null
get()
Get the repository value.
bool
isEmpty()
Determine if the repository is empty.
bool
isNotEmpty()
Determine if the repository is not empty.
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
at line 21
__construct(int|null $value = null)
Create an integer repository.
at line 31
IntegerRepository
set(int|null $value)
Set the repository value.
at line 41
int|null
get()
Get the repository value.
at line 49
bool
isEmpty()
Determine if the repository is empty.
at line 57
bool
isNotEmpty()
Determine if the repository is not empty.