Kartographer
Extension that adds maps to wiki pages
Loading...
Searching...
No Matches
Kartographer\Tag\Tag Class Reference

Generic handler to validate and preprocess the arguments of an XML-style parser tag. More...

Public Member Functions

 __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.
 

Public Attributes

string $name
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

Kartographer\Tag\Tag::__construct ( string $name,
array $args,
StatusValue $status )
Parameters
string$nameTag name, e.g. "maplink"
array<string,string>$args
StatusValue$status

Member Function Documentation

◆ getFloat()

Kartographer\Tag\Tag::getFloat ( string $name)
Parameters
string$name
Returns
float|null Null when missing or invalid

◆ getInt()

Kartographer\Tag\Tag::getInt ( string $name)
Parameters
string$name
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$nameAttribute name
string | null$regexpOptional regular expression to validate against
Returns
string|null Null when missing or invalid

◆ has()

Kartographer\Tag\Tag::has ( string $name)
Parameters
string$name
Returns
bool True if an attribute exists, even if valueless

The documentation for this class was generated from the following file: