protected function blockInclude($line)
    {
        if ($this->config["include"]
            && preg_match("/^#include[ \t]([\w.]+)$/", $line, $matches)
        ) {
            $file = $this->config["include_base"]."/".$matches[1];

            if (!is_readable($file)) {
                throw new Exception("Could not find include file: '$file'");
            }

            $include = file_get_contents($file);
            $include = str_replace(array("\r\n", "\r"), "\n", $include);
            $include = explode("\n", $include);
            array_splice(
                $this->lines,
                $this->lineNumber - 1,
                1,
                $include
            );

            $this->lineNumber--;
            return true;
        }
    }
protected function blockInclude($line)
    {
        if ($this->config["include"]
            && preg_match("/^#include[ \t]([\w.]+)$/", $line, $matches)
        ) {
            $file = $this->config["include_base"]."/".$matches[1];

            if (!is_readable($file)) {
                throw new Exception("Could not find include file: '$file'");
            }

            $include = file_get_contents($file);
            $include = str_replace(array("\r\n", "\r"), "\n", $include);
            $include = explode("\n", $include);
            array_splice(
                $this->lines,
                $this->lineNumber - 1,
                1,
                $include
            );

            $this->lineNumber--;
            return true;
        }
    }
protected function blockInclude ( $ line ) { if ( $ this -> config [ "include" ] && preg_match ( "/^#include[ \t]([\w.]+)$/" , $ line , $ matches ) ) { $ file = $ this -> config [ "include_base" ] . "/" . $ matches [ 1 ] ; if ( ! is_readable ( $ file ) ) { throw new Exception ( "Could not find include file: '$file'" ) ; } $ include = file_get_contents ( $ file ) ; $ include = str_replace ( array ( "\r\n" , "\r" ) , "\n" , $ include ) ; $ include = explode ( "\n" , $ include ) ; array_splice ( $ this -> lines , $ this -> lineNumber - 1 , 1 , $ include ) ; $ this -> lineNumber -- ; return true ; } }
Detect and include external file, add it to lines array and parse it.

@param string $line to begin parsing.

@return boolean|void true when block is found and parsed, else void.
Detect and include external file add it to lines array and parse it .