OriginalHtmlAttributesSet
Exact copy of \Laminas\View\HtmlAttributesSet final class, in order to allow extending it.
Class for storing and processing HTML tag attributes.
- Full name:
\TwbsHelper\View\OriginalHtmlAttributesSet - Parent class:
ArrayObject - This class implements:
Stringable
Properties
escaper
HTML escaper
private \Laminas\Escaper\Escaper $escaper
Methods
__construct
public __construct(\Laminas\Escaper\Escaper $escaper, iterable $attributes = []): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$escaper | \Laminas\Escaper\Escaper | |
$attributes | iterable |
set
Set several attributes at once.
public set(\TwbsHelper\View\AttributeSet $attributes): self
Parameters:
| Parameter | Type | Description |
|---|---|---|
$attributes | \TwbsHelper\View\AttributeSet |
add
Add a value to an attribute.
public add(string $name, scalar|array|null $value): self
Sets the attribute if it does not exist.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$value | scalar|array|null |
merge
Merge attributes with existing attributes.
public merge(\TwbsHelper\View\AttributeSet $attributes): self
Parameters:
| Parameter | Type | Description |
|---|---|---|
$attributes | \TwbsHelper\View\AttributeSet |
hasValue
Whether the named attribute equals or contains the given value
public hasValue(string $name, scalar|array|null $value): bool
Parameters:
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$value | scalar|array|null |
__toString
Return a string of tag attributes.
public __toString(): string