wp-all-import
/
classes
/
XmlStreamReader
/
prewk
/
xml-string-streamer
/
src
/
XmlStringStreamer
/
ParserInterface.php
wp-all-import
/
classes
/
XmlStreamReader
/
prewk
/
xml-string-streamer
/
src
/
XmlStringStreamer
Last commit date
Parser
2 years ago
Stream
1 month ago
ParserInterface.php
10 years ago
StreamInterface.php
10 years ago
ParserInterface.php
34 lines
| 1 | <?php |
| 2 | /** |
| 3 | * xml-string-streamer Parser interface |
| 4 | * |
| 5 | * @package xml-string-streamer |
| 6 | * @author Oskar Thornblad <oskar.thornblad@gmail.com> |
| 7 | */ |
| 8 | |
| 9 | namespace Prewk\XmlStringStreamer; |
| 10 | |
| 11 | /** |
| 12 | * Interface describing a parser |
| 13 | */ |
| 14 | interface ParserInterface |
| 15 | { |
| 16 | /** |
| 17 | * Parser contructor |
| 18 | * @param array $options An options array decided by the parser implementation |
| 19 | */ |
| 20 | public function __construct(array $options = array()); |
| 21 | |
| 22 | /** |
| 23 | * Tries to retrieve the next node or returns false |
| 24 | * @param StreamInterface $stream The stream to use |
| 25 | * @return string|bool The next xml node or false if one could not be retrieved |
| 26 | */ |
| 27 | public function getNodeFrom(StreamInterface $stream); |
| 28 | |
| 29 | /** |
| 30 | * Get the extracted container XML, if called before the whole stream is parsed, the XML returned can be invalid due to missing closing tags |
| 31 | * @return string XML string |
| 32 | */ |
| 33 | public function getExtractedContainer(); |
| 34 | } |