Generic handler to validate and preprocess the arguments of an XML-style parser tag.
More...
|
| __construct (string $name, array $args, StatusValue $status) |
|
| has (string $name) |
|
| getInt (string $name) |
|
| getFloat (string $name) |
|
| getString (string $name, ?string $regexp=null) |
| Returns value of a named tag attribute with optional validation.
|
|
Generic handler to validate and preprocess the arguments of an XML-style parser tag.
This class doesn't know anything about the arguments and what they mean.
@license MIT
◆ __construct()
Kartographer\Tag\Tag::__construct |
( |
string | $name, |
|
|
array | $args, |
|
|
StatusValue | $status ) |
- Parameters
-
string | $name | Tag name, e.g. "maplink" |
| array<string,string> | $args |
StatusValue | $status | |
◆ getFloat()
Kartographer\Tag\Tag::getFloat |
( |
string | $name | ) |
|
- Parameters
-
- Returns
- float|null Null when missing or invalid
◆ getInt()
Kartographer\Tag\Tag::getInt |
( |
string | $name | ) |
|
- Parameters
-
- Returns
- int|null Null when missing or invalid
◆ getString()
Kartographer\Tag\Tag::getString |
( |
string | $name, |
|
|
?string | $regexp = null ) |
Returns value of a named tag attribute with optional validation.
- Parameters
-
string | $name | Attribute name |
string | null | $regexp | Optional regular expression to validate against |
- Returns
- string|null Null when missing or invalid
◆ has()
Kartographer\Tag\Tag::has |
( |
string | $name | ) |
|
- Parameters
-
- Returns
- bool True if an attribute exists, even if valueless
The documentation for this class was generated from the following file: