Public Member Functions | |
MicroFormatParser () | |
parserSetup ($args) | |
parseSource ($str) | |
parseCard ($child) | |
parseCalendar ($child) | |
parseReview ($child) | |
parseRel ($child) | |
Public Attributes | |
$_dom = false | |
Dom object. | |
$_parseHCard = true | |
Parser switch. | |
$_parseHCalendar = true | |
Parser switch. | |
$_parseHReview = true | |
Parser switch. | |
$_parseRelTags = true | |
Parser switch. |
After you download it, extract the xarray.php file into the lib/ folder of this distribution.
MicroFormatParser::MicroFormatParser | ( | ) |
Constructor. Will die if no DOM XML extension found.
MicroFormatParser::parserSetup | ( | $ | args | ) |
Sets up parser switches. Accepts a hash of values to set up. Returns true on success, false on failure.
$args | Array of setup values. |
MicroFormatParser::parseSource | ( | $ | str | ) |
Main parser dispatcher method. This is where the first-level parsing gets dispatched to specific parser methods. Accepts (requires) a single string, containing HTML to be parsed for uFormats. Returns an xArray of parsed uFormats' objects.
$str | HTML to be parsed. |
MicroFormatParser::parseCard | ( | $ | child | ) |
HCard-specific first level parser. This is where all the hcard container elements are detected. Accepts a DOM XML node, and returns an xArray of found hcards.
Normaly, there should be no need to call this yourself. Use parseSource method with appropriate parser setup instead.
MicroFormatParser::parseCalendar | ( | $ | child | ) |
HCalendar-specific first level parser. This is where all the hcalendar container elements are detected. Accepts a DOM XML node, and returns an xArray of found hcalendars.
Normaly, there should be no need to call this yourself. Use parseSource method with appropriate parser setup instead.
MicroFormatParser::parseReview | ( | $ | child | ) |
HReview-specific first level parser. This is where all the hreview container elements are detected. Accepts a DOM XML node, and returns an xArray of found hreviews.
Normaly, there should be no need to call this yourself. Use parseSource method with appropriate parser setup instead.
MicroFormatParser::parseRel | ( | $ | child | ) |
RelTag-specific first level parser. This is where all the relTags container elements are detected. Accepts a DOM XML node, and returns an xArray of found relTags.
Normaly, there should be no need to call this yourself. Use parseSource method with appropriate parser setup instead.
MicroFormatParser::$_dom = false |
Dom object.
MicroFormatParser::$_parseHCard = true |
Parser switch.
MicroFormatParser::$_parseHCalendar = true |
Parser switch.
MicroFormatParser::$_parseHReview = true |
Parser switch.
MicroFormatParser::$_parseRelTags = true |
Parser switch.