예제 #1
0
파일: PHP.php 프로젝트: bloge/bloge
 /**
  * @{inheritDoc}
  */
 public function fetch($path, array $data = [])
 {
     $file = \Bloge\globPath($this->path($path));
     if (!is_file($file)) {
         throw new NotFoundException($path);
     }
     return \Bloge\renderData($file, $data);
 }
예제 #2
0
파일: Raw.php 프로젝트: bloge/bloge
 /**
  * @{inheritDoc}
  */
 public function fetch($path, array $data = [])
 {
     $file = \Bloge\globPath($this->path($path));
     if (!is_file($file)) {
         throw new NotFoundException($path);
     }
     return ['content' => file_get_contents($file)];
 }
예제 #3
0
파일: FrontMatter.php 프로젝트: bloge/bloge
 /**
  * @{inheritDoc} 
  */
 public function fetch($path, array $data = [])
 {
     $file = \Bloge\globPath($this->path($path));
     if (!is_file($file)) {
         throw new NotFoundException($path);
     }
     return \Bloge\frontMatter(file_get_contents($file), static::SEPARATOR);
 }