public function process(&$content)
    {
        //Add resources to the content
        $begin = "";
        $end = "";

        foreach ($this->tags as $tag) {
            if ($tag["at"]=="begin") {
                $begin.=$this->renderTag($tag);
            } else {
                $end.=$this->renderTag($tag);
            }
        }

        if ($begin!=='') {
            $count=0;
            $content=preg_replace(
                '/(<body\b[^>]*>)/is',
                '$1<###begin###>',
                $content,
                1,
                $count
            );
            if ($count) {
                $content=str_replace('<###begin###>', $begin, $content);
            } else {
                $content=$begin.$content;
            }
        }

        if ($end!=='') {
            $count=0;
            $content=preg_replace(
                '/(<\\/body\s*>)/is',
                '<###end###>$1',
                $content,
                1,
                $count
            );
            if ($count) {
                $content=str_replace('<###end###>', $end, $content);
            } else {
                $content=$content.$end;
            }
        }
    }
public function process(&$content)
    {
        //Add resources to the content
        $begin = "";
        $end = "";

        foreach ($this->tags as $tag) {
            if ($tag["at"]=="begin") {
                $begin.=$this->renderTag($tag);
            } else {
                $end.=$this->renderTag($tag);
            }
        }

        if ($begin!=='') {
            $count=0;
            $content=preg_replace(
                '/(<body\b[^>]*>)/is',
                '$1<###begin###>',
                $content,
                1,
                $count
            );
            if ($count) {
                $content=str_replace('<###begin###>', $begin, $content);
            } else {
                $content=$begin.$content;
            }
        }

        if ($end!=='') {
            $count=0;
            $content=preg_replace(
                '/(<\\/body\s*>)/is',
                '<###end###>$1',
                $content,
                1,
                $count
            );
            if ($count) {
                $content=str_replace('<###end###>', $end, $content);
            } else {
                $content=$content.$end;
            }
        }
    }
public function process ( & $ content ) { //Add resources to the content $ begin = "" ; $ end = "" ; foreach ( $ this -> tags as $ tag ) { if ( $ tag [ "at" ] == "begin" ) { $ begin .= $ this -> renderTag ( $ tag ) ; } else { $ end .= $ this -> renderTag ( $ tag ) ; } } if ( $ begin !== '' ) { $ count = 0 ; $ content = preg_replace ( '/(<body\b[^>]*>)/is' , '$1<###begin###>' , $ content , 1 , $ count ) ; if ( $ count ) { $ content = str_replace ( '<###begin###>' , $ begin , $ content ) ; } else { $ content = $ begin . $ content ; } } if ( $ end !== '' ) { $ count = 0 ; $ content = preg_replace ( '/(<\\/body\s*>)/is' , '<###end###>$1' , $ content , 1 , $ count ) ; if ( $ count ) { $ content = str_replace ( '<###end###>' , $ end , $ content ) ; } else { $ content = $ content . $ end ; } } }
Take content of report and adds resource to content

@param string $content Content of report

@return null
Take content of report and adds resource to content