$dom
$dom : \DOMDocument
Resource document DOM
Micrometa main parser class
$baseUrl : \Jkphl\Utility\Url
Resource document base URL
$_url : \Jkphl\Utility\Url
Resource document URL
__construct(\string $url, \string $source) : \Jkphl\Micrometa
Constructor
\string | $url | Resource document URL |
\string | $source | Resource document source code |
Micrometa parser object
focus(\DOMElement $element) : \DOMElement
Restrict the parsing of Microformats2 markup to a specific element node of the resource document DOM (and it's descendants)
\DOMElement | $element | Focus element node (must be a descendant of the resource document DOM) |
Focus element
parse() : \Jkphl\Micrometa
Parse the document for embedded micro information (all supported formats)
Micrometa parser object
item() : \Jkphl\Micrometa\Item
Return the first micro information item (of a specific type)
First micro information item of the resulting list
author(\int $entry) : \Jkphl\Micrometa\Parser\Microformats2\Item
Convenienve method extracting author data according to the microformats authorship algorithm
\int | $entry | h-entry index |
Author micro information item
externalAuthor() : NULL|\Jkphl\Micrometa\Item
Load and extract an external author definition
Author micro information item
toObject() : \stdClass
Return an object representation of the embedded micro information
Object representation
None found |
toJSON(\boolean $beautify) : \string
Return a JSON representation of the embedded micro information
\boolean | $beautify | Beautify the JSON output (available since PHP 5.4) |
JSON representation
None found |
__call(\string $method, \array $arguments) : \array|\Jkphl\Micrometa\Item
Generic caller
Returns all microformats2 items of a spefic type (or a particular index out of this list)
\string | $method | Method name (lowerCamelCased microformats2 item type) |
\array | $arguments | List of arguments, of which the first is interpreted as list index (NULL = return the complete list) |
If it's not a valid microformats2 vocable
If the item index is out of range
List of microformats2 items or a single microformats2 item
None found |
__get(\string $key) : \Jkphl\Micrometa\Item
Generic getter
Returns the first microformats2 item of a specific type. Calling this method is equivalent to
Example: All of the following are equivalent
$micrometa->item('h-card') $micrometa->hCard $micrometa->hCard(0)
\string | $key | Property name (lowerCamelCased microformats2 item type) |
microformats2 item
None found |
instance(\string $url, \string $source) : \Jkphl\Micrometa
Instance constructor
\string | $url | Resource document URL |
\string | $source | Resource document source code |
Micrometa parser object
None found |