abstract class AttributeName

Attribute name rules:

  • must start with a letter or an underscore
  • can only contain letters, numbers, underscores and dashes

Unprefixed names are normalized to uppercase. Prefixed names are preserved as-is.

Methods

static bool
isValid(string $name)

Return whether a string is a valid attribute name

static string
normalize(string $name)

Normalize a tag name

Details

at line 27
static bool isValid(string $name)

Return whether a string is a valid attribute name

Parameters

string $name

Return Value

bool

at line 40
static string normalize(string $name)

Normalize a tag name

Parameters

string $name

Original name

Return Value

string

Normalized name

Exceptions

InvalidArgumentException