Attributes
FinalYes
HTML attributes.
Table of Contents
Methods
- __toString() : string
- Generates escaped HTML string with attributes.
- get() : mixed
- Get attribute.
- remove() : mixed
- Remove attribute.
- set() : self
- Set attribute.
- setData() : self
- Set data attribute.
Methods
__toString()
Generates escaped HTML string with attributes.
public
__toString() : string
Return values
stringget()
Get attribute.
public
get(string $name) : mixed
Parameters
- $name : string
remove()
Remove attribute.
public
remove(string $name) : mixed
Parameters
- $name : string
Return values
mixed —returns removed attribute value.
set()
Set attribute.
public
set(string $name, mixed $value) : self
For data-*
attributes see method setData
Parameters
- $name : string
- $value : mixed
Return values
selfsetData()
Set data attribute.
public
setData(string $name, mixed $value) : self
For other attributes see method set
Parameters
- $name : string
- $value : mixed