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
escapeAttr($s)

Escapes string for use inside XML attribute value.

static string
escapeTag($s)

Escapes string for use inside XML tag.

static string
formatAttribute(string $namePart, mixed $value, bool $migrationWarnings = false)

No description

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 escapeAttr($s)

Escapes string for use inside XML attribute value.

Parameters

$s

Return Value

string

at line 61
static string escapeTag($s)

Escapes string for use inside XML tag.

Parameters

$s

Return Value

string

at line 72
static string formatAttribute(string $namePart, mixed $value, bool $migrationWarnings = false)

No description

Parameters

string $namePart
mixed $value
bool $migrationWarnings

Return Value

string

at line 88
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 101
static void validateAttributeName(mixed $name)

No description

Parameters

mixed $name

Return Value

void