/** @var array A ranking of prefixes (with 0 being least preferred) to break ties when multiple properties of the same name exist on one element */
/** @var array A ranking of prefixes (with 1 being least preferred) to break ties when multiple properties of the same name exist on one element */
protected const PREFIX_RANK = [
"p" => 1,
"dt" => 2,
@ -19,6 +19,7 @@ class Parser {
];
/** @var array The list of class names which are backward-compatibility microformat markers */
protected const BACKCOMPAT_ROOTS = [
// NOTE: "item" also functions as a root, but it is never a first-level root, so it is not listed here and is instead accommodated via special processing
'adr' => "h-adr",
'vcard' => "h-card",
'hfeed' => "h-feed",
@ -119,8 +120,8 @@ class Parser {
];
/** @var array The list of link relations which are backward-compatibility property markers. The format is the same as for backcompat classes */
protected const BACKCOMPAT_RELATIONS = [
// h-review and h-review-agregate also include "self bookmark", but this requires special processing
// the tag relation also requires special processing
// h-review and h-review-agregate also include "self bookmark", but this requires special processing to identify
// the tag relation also requires special processing to retrieve the correct value
'base' => ["href"], // this requires special processing to not resolve against itself
'blockquote' => ["cite"],
'button' => ["formaction"],
'del' => ["cite"],
@ -216,18 +217,26 @@ class Parser {
self::DATE_TYPE_ZULU => '\Z',
];
/** @var array The list of options supplied by the user, after normallization */
protected $options;
/** @var string The base URL supplied by the user, resolved against <basehref="..."> when appropriate */
protected $baseUrl;
/** @var string The base URL supplied by the user, with no further normalization or transformation */
protected $docUrl;
/** @var \DOMXPath The XPtah processor used for certain aspects of parsing */
protected $xpath;
/** @var array The list of microformat root candidates found by XPath at the start of processing; the array is manipulated during processing to remove child roots so that they are only processed once */