final class HtmlHelpers

internal  
 

Runtime utilities for handling HTML.

Methods

static string|null
formatAttribute(string $name, mixed $value)

Formats HTML attribute value based on attribute type and value type.

static bool
isVoidElement(string $name)

Checks if the given tag name represents a void (empty) HTML element.

static string
validateTagChange(mixed $name, string|null $origName = null)

Checks that the HTML tag name can be changed.

Details

at line 25
static string|null formatAttribute(string $name, mixed $value)

Formats HTML attribute value based on attribute type and value type.

Parameters

string $name
mixed $value

Return Value

string|null

at line 68
static bool isVoidElement(string $name)

Checks if the given tag name represents a void (empty) HTML element.

Parameters

string $name

Return Value

bool

at line 81
static string validateTagChange(mixed $name, string|null $origName = null)

Checks that the HTML tag name can be changed.

Parameters

mixed $name
string|null $origName

Return Value

string