TraitAttributeBag
Trait PropertyBagTrait.
Tags
Table of Contents
Properties
- $attributes : array<string, mixed|null>
Methods
- __call() : self|mixed|string|null
- config() : $this
- This method is deprecated. Prefer `setAttributes` to be safe.
- getAttribute() : mixed|null
- removeAttribute() : $this
- Remove an attribute by specific name.
- setAttribute() : $this
- Set attribute name/value pair.
- setAttributes() : self
Properties
$attributes
protected
array<string, mixed|null>
$attributes
= []
Methods
__call()
public
__call(string $method, array<int, mixed> $args) : self|mixed|string|null
Parameters
- $method : string
- $args : array<int, mixed>
Return values
self|mixed|string|nullconfig()
This method is deprecated. Prefer `setAttributes` to be safe.
public
config(array<string, mixed> $options) : $this
Parameters
- $options : array<string, mixed>
Tags
Return values
$thisgetAttribute()
public
getAttribute(string $name[, mixed $value = null ]) : mixed|null
Parameters
- $name : string
- $value : mixed = null
Return values
mixed|nullremoveAttribute()
Remove an attribute by specific name.
public
removeAttribute(string $name) : $this
Parameters
- $name : string
Return values
$thissetAttribute()
Set attribute name/value pair.
public
setAttribute(string $name, mixed|null $value) : $this
Parameters
- $name : string
- $value : mixed|null
Return values
$thissetAttributes()
public
setAttributes(array<string|int, mixed> $attributes) : self
Parameters
- $attributes : array<string|int, mixed>