示例#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;
 }