コード例 #1
0
ファイル: Tree.php プロジェクト: nami-doc/sprockets-php
 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
ファイル: File.php プロジェクト: nami-doc/sprockets-php
 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;
 }