Пример #1
0
 protected function findAll($force = false)
 {
     if (null === $this->themes || true === $force) {
         //$this->themes = [];
         $this->themes = $this->fs->directories($this->path);
     }
     return $this->themes;
 }
Пример #2
0
 protected function __construct()
 {
     $this->app = Container::getInstance();
     $this->processors = new Collections\ProcessorCollection([], $this);
     $this->hooks = new Collections\HookCollection([], $this);
     $this->views = new Collections\ViewCollection([], $this);
     $this->plugins = new Collections\PluginCollection([], $this);
     $this->reader = new AnnotationReader();
     $this->fs = new Filesystem();
     $this->manifest = Manifest::make()->load();
     $this->scanner = new \Laradic\AnnotationScanner\Factory($this->reader, $this->fs);
     foreach ($this->fs->globule(__DIR__ . '/Annotations/*.php') as $filePath) {
         $this->scanner->registerAnnotation($filePath);
     }
     $this->scanner->addAnnotation([Annotations\Plugin::class, Annotations\Hook::class, Annotations\Processor::class]);
     #$this->scanner  = new Scanner($this, $this->manifest, $this->reader, $this->fs);
 }
Пример #3
0
 protected function renderTo($dest, $view, array $data = [])
 {
     $this->fs->put(path_join(config('codex.paths.docs'), $this->name, $dest), $this->render($view, $data));
 }
Пример #4
0
 /**
  * @param int $options
  *
  * @return static
  */
 public function save($options = JSON_UNESCAPED_SLASHES)
 {
     $manifest = json_encode($this->items, $options);
     $this->fs->put($this->getManifestPath(), $manifest);
     return $this;
 }