src/Theme.php
public function blader($str, $data = array(), $phpCompile = true)
    {
        if ($phpCompile == false) {
            $patterns = array('|<\?|', '|<\?php|', '|<\%|', '|\?>|', '|\%>|');
            $replacements = array('&lt;?', '&lt;php', '&lt;%', '?&gt;', '%&gt;');

            $str = preg_replace($patterns, $replacements, $str);
        }

        // Get blade compiler.
        $parsed = $this->getCompiler('blade')->compileString($str);

        ob_start() and extract($data, EXTR_SKIP);

        try {
            eval('?>'.$parsed);
        } catch (\Exception $e) {
            ob_end_clean(); throw $e;
        }

        $str = ob_get_contents();
        ob_end_clean();

        return $str;
    }
public function blader($str, $data = array(), $phpCompile = true)
    {
        if ($phpCompile == false) {
            $patterns = array('|<\?|', '|<\?php|', '|<\%|', '|\?>|', '|\%>|');
            $replacements = array('&lt;?', '&lt;php', '&lt;%', '?&gt;', '%&gt;');

            $str = preg_replace($patterns, $replacements, $str);
        }

        // Get blade compiler.
        $parsed = $this->getCompiler('blade')->compileString($str);

        ob_start() and extract($data, EXTR_SKIP);

        try {
            eval('?>'.$parsed);
        } catch (\Exception $e) {
            ob_end_clean(); throw $e;
        }

        $str = ob_get_contents();
        ob_end_clean();

        return $str;
    }
public function blader ( $ str , $ data = array ( ) , $ phpCompile = true ) { if ( $ phpCompile == false ) { $ patterns = array ( '|<\?|' , '|<\?php|' , '|<\%|' , '|\?>|' , '|\%>|' ) ; $ replacements = array ( '&lt;?' , '&lt;php' , '&lt;%' , '?&gt;' , '%&gt;' ) ; $ str = preg_replace ( $ patterns , $ replacements , $ str ) ; } // Get blade compiler. $ parsed = $ this -> getCompiler ( 'blade' ) -> compileString ( $ str ) ; ob_start ( ) and extract ( $ data , EXTR_SKIP ) ; try { eval ( '?>' . $ parsed ) ; } catch ( \ Exception $ e ) { ob_end_clean ( ) ; throw $ e ; } $ str = ob_get_contents ( ) ; ob_end_clean ( ) ; return $ str ; }
Parses and compiles strings by using blade template system.

@param  string $str
@param  array $data
@param  boolean $phpCompile
@throws \Exception
@return string
Parses and compiles strings by using blade template system .