AttributeBag
class AttributeBag extends Collection implements AttributeBag
Methods
__construct(array $attributes = array())
Create new AttributeBag.
mixed
getValue(string $key)
Get attribute value.
$this
forget(string $key)
Unset attribute.
void
offsetSet(string $key, mixed $value)
Set attribute.
void
offsetUnset(string $key)
Set attribute to null.
__set(string $key, mixed $value)
Handle dynamic properties.
mixed
__get(string $key)
Handle dynamic properties.
boolean
__isset(string $key)
Handle isset calls.
void
__unset(string $key)
Handle unset calls.
replicate($except = null)
Create copy of the attribute bag.
Details
at line 14
__construct(array $attributes = array())
Create new AttributeBag.
at line 29
$this
set(Attribute|string $key, mixed $value = null)
Add or update attribute.
at line 65
add(Attribute $attribute)
Set attribute.
at line 117
mixed
getValue(string $key)
Get attribute value.
at line 130
$this
forget(string $key)
Unset attribute.
at line 146
void
offsetSet(string $key, mixed $value)
Set attribute.
at line 157
void
offsetUnset(string $key)
Set attribute to null.
at line 168
__set(string $key, mixed $value)
Handle dynamic properties.
at line 179
mixed
__get(string $key)
Handle dynamic properties.
at line 190
boolean
__isset(string $key)
Handle isset calls.
at line 201
void
__unset(string $key)
Handle unset calls.
at line 234
AttributeBag
replicate($except = null)
Create copy of the attribute bag.