HasAttributesInterface
interface HasAttributesInterface (View source)
Represent an object which has an array of attributes.
Methods
mixed
getAttribute(string $attribute, mixed $default = '')
Get attribute.
array
getAttributes()
Get all attributes.
void
setAttribute(string $attribute, mixed $value)
Set attribute.
attribute(string $attribute, mixed $value)
Fluent alias for setAttribute().
void
setAttributes(array $attributes)
Set attributes.
attributes(array $attributes)
Fluent alias for setAttributes().
Details
at line 23
mixed
getAttribute(string $attribute, mixed $default = '')
Get attribute.
at line 30
array
getAttributes()
Get all attributes.
at line 39
void
setAttribute(string $attribute, mixed $value)
Set attribute.
at line 48
HasAttributesInterface
attribute(string $attribute, mixed $value)
Fluent alias for setAttribute().
at line 57
void
setAttributes(array $attributes)
Set attributes.
No attempt to merge attributes is done - this is a direct overwrite operation.
at line 65
HasAttributesInterface
attributes(array $attributes)
Fluent alias for setAttributes().