public function __construct($name, $type, $vars) { $this->name = $name; $this->type = $type; $this->vars = $vars; $this->locator = Pipeline::getCurrentInstance()->getLocator(); $this->path = $this->locator->getDirectory($name, $type); }
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; }