-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
Mac2 edited this page Apr 23, 2012
·
2 revisions
- anlegen eines Unterordners plib/ im eigenen Projekt
- Download der aktuellen Version der libIWParser GitHub Repo
- Entpacken in den Ordner plib/
$textinput = "zu parsender Input";
require_once ('plib/ParserFactoryConfigC.php');
$availParsers = new ParserFactoryConfigC(); // holen aller verfuegbaren Parser
$parserObj = $availParsers->getParser($textinput); // ermitteln des richtigen Parsers
if( $parserObj instanceof ParserI )
{
$parserResult = new DTOParserResultC ($parserObj);
$parserObj->parseText ($parserResult); // parsen des Inputs
}
else {
echo "unrecognised Input (no suitable Parser found)<br />";
}
Footer