Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getFiles()
 {
     $finder = new Finder();
     $iterator = $finder->files()->in($this->configuration->docsPath())->name('*.' . $this->fileExtension);
     $files = [];
     foreach ($iterator as $file) {
         $files[] = new $this->fileNamespace($file->getBasename('.' . $this->fileExtension), '/' . $file->getRelativePath(), $file->getContents());
     }
     return $files;
 }
Exemplo n.º 2
0
 function let(Configuration $configuration)
 {
     $configuration->buildPath()->willReturn(__DIR__ . '/../fixtures/');
     $this->beConstructedWith($configuration);
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function get($path)
 {
     return json_decode(file_get_contents($this->configuration->buildPath() . 'menu.json'), true);
 }