private static function processFilters($path, $dir, $filters, $vars)
{
$pipeline = Pipeline::getCurrentInstance();
$content = file_get_contents($path);
if (false === $content) {
throw new Exception\FileNotFound($path);
}
foreach ($filters as $filter) {
$content = $pipeline->applyFilter($content, $filter, $path, $dir, $vars);
}
return $content;
}