Attribute
class Attribute
Properties
| null|callable | $get | The attribute accessor. |
|
| null|callable | $set | The attribute mutator. |
|
| bool | $withCaching | Indicates if caching is enabled for this attribute. |
|
| bool | $withObjectCaching | Indicates if caching of objects is enabled for this attribute. |
Methods
__construct(callable|null $get = null, callable|null $set = null)
Create a new attribute accessor / mutator.
static Attribute
make(callable|null $get = null, callable|null $set = null)
Create a new attribute accessor / mutator.
withoutObjectCaching()
Disable object caching for the attribute.
shouldCache()
Enable caching for the attribute.
Details
at line 36
__construct(callable|null $get = null, callable|null $set = null)
Create a new attribute accessor / mutator.
at line 45
static Attribute
make(callable|null $get = null, callable|null $set = null)
Create a new attribute accessor / mutator.
at line 53
static Attribute
get(callable $get)
Create a new attribute accessor.
at line 61
static Attribute
set(callable $set)
Create a new attribute mutator.
at line 69
Attribute
withoutObjectCaching()
Disable object caching for the attribute.
at line 79
Attribute
shouldCache()
Enable caching for the attribute.