Example #1
0
File: PHP.php Project: 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);
 }
Example #2
0
File: Raw.php Project: 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)];
 }
Example #3
0
 /**
  * @{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);
 }