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

getOpeningTagPos() protected method

Search the blob for our unique node's opening tag
protected getOpeningTagPos ( ) : boolean | integer
return boolean | integer Either returns the char position of the opening tag or false
    protected function getOpeningTagPos()
    {
        $startPositionInBlob = false;
        if (preg_match("/<" . preg_quote($this->options["uniqueNode"]) . "(>| )/", $this->workingBlob, $matches, PREG_OFFSET_CAPTURE) === 1) {
            $startPositionInBlob = $matches[0][1];
        }
        if ($startPositionInBlob === false) {
            $this->hasSearchedUntilPos = strlen($this->workingBlob) - 1;
        }
        return $startPositionInBlob;
    }