Пример #1
0
 /**
  * @\Nucleus\IService\EventDispatcher\Listen(eventName="ServiceContainer.postDump")
  */
 public function mirror()
 {
     $this->fileSystem->remove(glob($this->rootDirectory . '/*'));
     foreach ($this->configuration['toMirror'] as $sectionName => $mirrorConfiguration) {
         $endTarget = isset($mirrorConfiguration['target']) ? $mirrorConfiguration['target'] : $sectionName;
         $target = $this->rootDirectory . '/' . $endTarget;
         $source = $mirrorConfiguration['source'];
         $sourcePath = stream_resolve_include_path($source);
         $this->fileSystem->mirror($sourcePath, $target, null, array('copy_on_windows' => true, 'delete' => false));
     }
 }
Пример #2
0
 public function delete($name, $namespace = ICacheService::NAMESPACE_DEFAULT)
 {
     $key = $this->getFile($name, $namespace);
     $this->fileSystem->remove(array($key));
 }
Пример #3
0
 /**
  * @\Nucleus\IService\EventDispatcher\Listen(eventName="ServiceContainer.postDump")
  *
  * @param ContainerBuilder $containerBuilder
  */
 public function generateDoc(ContainerBuilder $containerBuilder)
 {
     $docs = new DocDumper($containerBuilder);
     $this->fileSystem->dumpFile($this->docFilename, $docs->dump(array()));
 }
Пример #4
0
 public function exists($path)
 {
     return $this->fileSystem->exists($this->rootDirectory . $path);
 }