示例#1
0
 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);
 }
示例#2
0
 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;
 }