protected function _replace($matches)
{
$file = $this->_currentFile;
if ($matches[1] === '"') {
// Same directory include
$file = $this->_findFile($matches[2], dirname($file) . DIRECTORY_SEPARATOR);
} else {
// scan all paths
$file = $this->_findFile($matches[2]);
}
// prevent double inclusion
if (isset($this->_loaded[$file])) {
return "";
}
$this->_loaded[$file] = true;
$content = file_get_contents($file);
if ($return = $this->input($file, $content)) {
return $return . "\n";
}
return '';
}