app/Report/ReportParserGenerate.php
protected function startElement($parser, string $name, array $attrs): void
    {
        $newattrs = [];

        foreach ($attrs as $key => $value) {
            if (preg_match("/^\\$(\w+)$/", $value, $match)) {
                if (isset($this->vars[$match[1]]['id']) && !isset($this->vars[$match[1]]['gedcom'])) {
                    $value = $this->vars[$match[1]]['id'];
                }
            }
            $newattrs[$key] = $value;
        }
        $attrs = $newattrs;
        if ($this->process_footnote && ($this->process_ifs === 0 || $name === 'if') && ($this->process_gedcoms === 0 || $name === 'Gedcom') && ($this->process_repeats === 0 || $name === 'Facts' || $name === 'RepeatTag')) {
            $start_method = $name . 'StartHandler';
            $end_method   = $name . 'EndHandler';

            if (method_exists($this, $start_method)) {
                $this->$start_method($attrs);
            } elseif (!method_exists($this, $end_method)) {
                $this->htmlStartHandler($name, $attrs);
            }
        }
    }
protected function startElement($parser, string $name, array $attrs): void
    {
        $newattrs = [];

        foreach ($attrs as $key => $value) {
            if (preg_match("/^\\$(\w+)$/", $value, $match)) {
                if (isset($this->vars[$match[1]]['id']) && !isset($this->vars[$match[1]]['gedcom'])) {
                    $value = $this->vars[$match[1]]['id'];
                }
            }
            $newattrs[$key] = $value;
        }
        $attrs = $newattrs;
        if ($this->process_footnote && ($this->process_ifs === 0 || $name === 'if') && ($this->process_gedcoms === 0 || $name === 'Gedcom') && ($this->process_repeats === 0 || $name === 'Facts' || $name === 'RepeatTag')) {
            $start_method = $name . 'StartHandler';
            $end_method   = $name . 'EndHandler';

            if (method_exists($this, $start_method)) {
                $this->$start_method($attrs);
            } elseif (!method_exists($this, $end_method)) {
                $this->htmlStartHandler($name, $attrs);
            }
        }
    }
protected function startElement ( $ parser , string $ name , array $ attrs ) : void { $ newattrs = [ ] ; foreach ( $ attrs as $ key => $ value ) { if ( preg_match ( "/^\\$(\w+)$/" , $ value , $ match ) ) { if ( isset ( $ this -> vars [ $ match [ 1 ] ] [ 'id' ] ) && ! isset ( $ this -> vars [ $ match [ 1 ] ] [ 'gedcom' ] ) ) { $ value = $ this -> vars [ $ match [ 1 ] ] [ 'id' ] ; } } $ newattrs [ $ key ] = $ value ; } $ attrs = $ newattrs ; if ( $ this -> process_footnote && ( $ this -> process_ifs === 0 || $ name === 'if' ) && ( $ this -> process_gedcoms === 0 || $ name === 'Gedcom' ) && ( $ this -> process_repeats === 0 || $ name === 'Facts' || $ name === 'RepeatTag' ) ) { $ start_method = $ name . 'StartHandler' ; $ end_method = $ name . 'EndHandler' ; if ( method_exists ( $ this , $ start_method ) ) { $ this -> $ start_method ( $ attrs ) ; } elseif ( ! method_exists ( $ this , $ end_method ) ) { $ this -> htmlStartHandler ( $ name , $ attrs ) ; } } }
XML start element handler
This function is called whenever a starting element is reached
The element handler will be called if found, otherwise it must be HTML

@param resource $parser the resource handler for the XML parser
@param string   $name   the name of the XML element parsed
@param string[] $attrs  an array of key value pairs for the attributes

@return void
XML start element handler This function is called whenever a starting element is reached The element handler will be called if found otherwise it must be HTML