Parses and sanitizes text properties of GeoJSON/simplestyle by putting them through the MediaWiki wikitext parser.
More...
|
const | WIKITEXT_PROPERTIES = [ 'title', 'description' ] |
|
Parses and sanitizes text properties of GeoJSON/simplestyle by putting them through the MediaWiki wikitext parser.
@license MIT
◆ __construct()
Kartographer\SimpleStyleParser::__construct |
( |
WikitextParser | $parser, |
|
|
array | $options = [] ) |
- Parameters
-
WikitextParser | $parser | |
array | $options | Set ['saveUnparsed' => true] to back up the original values of title and description in _origtitle and _origdescription |
◆ findFirstMarkerSymbol()
static Kartographer\SimpleStyleParser::findFirstMarkerSymbol |
( |
array | $values | ) |
|
|
static |
- Parameters
-
- Returns
- array{string,stdClass}|null Same as {
- See also
- updateMarkerSymbolCounters}, but with the $firstMarkerSymbol name not updated
◆ normalizeAndSanitize()
Kartographer\SimpleStyleParser::normalizeAndSanitize |
( |
& | $data | ) |
|
- Parameters
-
stdClass[] | stdClass | &$data | |
- Returns
- StatusValue
◆ parse()
Kartographer\SimpleStyleParser::parse |
( |
?string | $input | ) |
|
Parses string into JSON and performs validation/sanitization.
- Parameters
-
- Returns
- StatusValue with the value being [ 'data' => stdClass[], 'schema-errors' => array[] ]
◆ parseObject()
Kartographer\SimpleStyleParser::parseObject |
( |
& | $data | ) |
|
Validate and sanitize a parsed GeoJSON data object.
- Parameters
-
- Returns
- StatusValue
◆ updateMarkerSymbolCounters()
static Kartographer\SimpleStyleParser::updateMarkerSymbolCounters |
( |
array | $values, |
|
|
array & | $counters = [] ) |
|
static |
- Parameters
-
stdClass[] | $values | |
| array<string,int> | &$counters |
- Returns
- array{string,stdClass}|null [ string $firstMarkerSymbol, stdClass $firstMarkerProperties ]
The documentation for this class was generated from the following file:
- includes/SimpleStyleParser.php