Property | Type | Description | |
---|---|---|---|
$containerXml | string | If extractContainer is true, this will grow with the XML captured before and after the specified capture depth | |
$preCapture | boolean | Whether we're found our first capture target or not |
Method | Description | |
---|---|---|
__construct ( array $options = [] ) | Parser constructor | |
getExtractedContainer ( ) : string | Get the extracted container XML, if called before the whole stream is parsed, the XML returned can be invalid due to missing closing tags | |
getNodeFrom ( Prewk\XmlStringStreamer\StreamInterface $stream ) : string | boolean | Tries to retrieve the next node or returns false |
Method | Description | |
---|---|---|
flush ( integer $endPositionInBlob ) | Cut everything from the start position to the end position in the workingBlob (+ tag length) and flush it out for later return in getNodeFrom | |
getClosingTagPos ( ) : boolean | integer | Search the blob for our unique node's closing tag | |
getOpeningTagPos ( ) : boolean | integer | Search the blob for our unique node's opening tag | |
prepareChunk ( Prewk\XmlStringStreamer\StreamInterface $stream ) : boolean | Decides whether we're to fetch more chunks from the stream or keep working with what we have. | |
startSalvaging ( integer $startPositionInBlob ) | Set the start position in the workingBlob from where we should start reading when the closing tag is found |
Method | Description | |
---|---|---|
checkShortClosingTag ( string $workingBlob, integer $len ) : boolean | integer | Search short closing tag in $workingBlob before |
public __construct ( array $options = [] ) | ||
$options | array | An options array |
protected getClosingTagPos ( ) : boolean | integer | ||
return | boolean | integer | Either returns the char position of the closing tag or false |
public getExtractedContainer ( ) : string | ||
return | string | XML string |
public getNodeFrom ( Prewk\XmlStringStreamer\StreamInterface $stream ) : string | boolean | ||
$stream | Prewk\XmlStringStreamer\StreamInterface | The stream to use |
return | string | boolean | The next xml node or false if one could not be retrieved |
protected getOpeningTagPos ( ) : boolean | integer | ||
return | boolean | integer | Either returns the char position of the opening tag or false |
protected prepareChunk ( Prewk\XmlStringStreamer\StreamInterface $stream ) : boolean | ||
$stream | Prewk\XmlStringStreamer\StreamInterface | The stream provider |
return | boolean | Keep working? |
protected startSalvaging ( integer $startPositionInBlob ) | ||
$startPositionInBlob | integer | Position of starting tag |
protected string $containerXml | ||
return | string |
protected bool $preCapture | ||
return | boolean |