Ejemplo n.º 1
0
Archivo: PHP.php Proyecto: 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);
 }
Ejemplo n.º 2
0
Archivo: Raw.php Proyecto: 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)];
 }
Ejemplo n.º 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);
 }