Parses and sanitizes text properties of GeoJSON/simplestyle by putting them through the MediaWiki wikitext parser.
More...
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 |
◆ newFromParser()
static Kartographer\SimpleStyleParser::newFromParser |
( |
Parser | $parser, |
|
|
PPFrame | $frame = null ) |
|
static |
- Parameters
-
Parser | $parser | |
PPFrame | null | $frame | |
- Returns
- self
◆ normalizeAndSanitize()
Kartographer\SimpleStyleParser::normalizeAndSanitize |
( |
& | $data | ) |
|
- Parameters
-
stdClass[] | stdClass | &$data | |
- Returns
- Status
◆ parse()
Kartographer\SimpleStyleParser::parse |
( |
?string | $input | ) |
|
Parses string into JSON and performs validation/sanitization.
- Parameters
-
- Returns
- Status with the value being [ 'data' => stdClass[], 'schema-errors' => array[] ]
◆ parseObject()
Kartographer\SimpleStyleParser::parseObject |
( |
& | $data | ) |
|
Validate and sanitize a parsed GeoJSON data object.
- Parameters
-
- Returns
- Status
◆ updateMarkerSymbolCounters()
static Kartographer\SimpleStyleParser::updateMarkerSymbolCounters |
( |
array | $values, |
|
|
array & | $counters = [] ) |
|
static |
- Parameters
-
stdClass[] | $values | |
int[] | &$counters | |
- Returns
- array|false [ string $markerSymbol, stdClass $markerProperties ]
The documentation for this class was generated from the following file:
- includes/SimpleStyleParser.php