Skip to content

altaist/parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test PHP parser

Usage

try {
  $parserBuilder = (new ParserBuilder())
    ->setTransportClass(FromTextTransport::class)
    ->setStorageClass(TagStorage::class)
    ->setProcessorClass(TagCounterProcessor::class)
    ->setParserClass(TagCounterParser::class);

  $parser = $parserBuilder->build();

  $resultData = $parser->parse(new TextSource("<br><p></p><p>"));
  $result = new ParseResultFormatter($resultData);

  print_r($result->getAsArray());

} catch (TransportException $th) {
} catch (ParseException $th) {
}

See Example\TagCounterExample.php for complete example.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages