$_url
$_url : \Jkphl\Utility\Url
Original resource URL
Extended Microformats2 parser
$_url : \Jkphl\Utility\Url
Original resource URL
__construct(\DOMDocument|string $input, \Jkphl\Utility\Url|\string $url)
Constructor
\DOMDocument|string | $input | The data to parse. A string of HTML or a DOMDocument |
\Jkphl\Utility\Url|\string | $url | Optional: The URL of the parsed document, for relative URL resolution |
parse(bool $convertClassic, \Jkphl\Micrometa\Parser\DOMElement $context) : array
Kicks off the parsing routine
If $convertClassic
is set, any angle brackets in the results from non e-* properties
will be HTML-encoded, bringing all output to the same level of encoding.
If a DOMElement is set as the $context, only descendants of that element will be parsed for microformats.
bool | $convertClassic | Whether or not to html-encode non e-* properties. Defaults to false |
\Jkphl\Micrometa\Parser\DOMElement | $context | Optionall: An element from which to parse microformats |
An array containing all the µfs found in the current document
decamelize(\string $vocable, \string $separator) : \string
Decamelize a lower- or UpperCameCase microformats2 vocable (has no effect on regular vocables)
\string | $vocable | Vocable |
\string | $separator | Separation char / vocable |
If it's not a valid microformats2 vocable
Decamelized vocable