final class XmlHelpers

internal  
 

Runtime utilities for handling XML.

Constants

private ReNameStart

private ReName

Methods

static string
escapeText($s)

Escapes string for use everywhere inside XML (except for comments and tags).

static string
escapeTag($s)

Escapes string for use inside XML tag.

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

Formats XML attribute value based on value type.

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

Checks that the HTML tag name can be changed.

static void
validateAttributeName(mixed $name)

No description

Details

at line 32
static string escapeText($s)

Escapes string for use everywhere inside XML (except for comments and tags).

Parameters

$s

Return Value

string

at line 49
static string escapeTag($s)

Escapes string for use inside XML tag.

Parameters

$s

Return Value

string

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

Formats XML attribute value based on value type.

Parameters

string $name
mixed $value

Return Value

string|null

at line 77
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

at line 90
static void validateAttributeName(mixed $name)

No description

Parameters

mixed $name

Return Value

void