Prewk\XmlStringStreamer\Parser\UniqueNode::getClosingTagPos PHP Method

getClosingTagPos() protected method

Search the blob for our unique node's closing tag
protected getClosingTagPos ( ) : boolean | integer
return boolean | integer Either returns the char position of the closing tag or false
    protected function getClosingTagPos()
    {
        $endPositionInBlob = strpos($this->workingBlob, "</" . $this->options["uniqueNode"] . ">");
        if ($endPositionInBlob === false) {
            if (isset($this->options["checkShortClosing"]) && $this->options["checkShortClosing"] === true) {
                $endPositionInBlob = $this->checkShortClosingTag($this->workingBlob, $this->startPos);
            }
            if ($endPositionInBlob === false) {
                $this->hasSearchedUntilPos = strlen($this->workingBlob) - 1;
            } else {
                $this->shortClosedTagNow = true;
            }
        } else {
            if (isset($this->options["checkShortClosing"]) && $this->options["checkShortClosing"] === true) {
                $tmpEndPositionInBlob = $this->checkShortClosingTag(substr($this->workingBlob, 0, $endPositionInBlob), $this->startPos);
                if ($tmpEndPositionInBlob !== false) {
                    $this->shortClosedTagNow = true;
                    $endPositionInBlob = $tmpEndPositionInBlob;
                }
            }
        }
        return $endPositionInBlob;
    }