芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/livewire/livewire/src/LivewireComponentsFinder.php
files = $files; $this->path = $path; $this->manifestPath = $manifestPath; } public function find($alias) { return $this->getManifest()[$alias] ?? null; } public function getManifest() { if (! is_null($this->manifest)) { return $this->manifest; } if (! file_exists($this->manifestPath)) { $this->build(); } return $this->manifest = $this->files->getRequire($this->manifestPath); } public function build() { $this->manifest = $this->getClassNames() ->mapWithKeys(function ($class) { return [$class::getName() => $class]; })->toArray(); $this->write($this->manifest); return $this; } protected function write(array $manifest) { if (! is_writable(dirname($this->manifestPath))) { throw new Exception('The '.dirname($this->manifestPath).' directory must be present and writable.'); } $this->files->put($this->manifestPath, 'files->allFiles($this->path)) ->map(function (SplFileInfo $file) { return app()->getNamespace(). str($file->getPathname()) ->after(app_path().'/') ->replace(['/', '.php'], ['\\', ''])->__toString(); }) ->filter(function (string $class) { return is_subclass_of($class, Component::class) && ! (new ReflectionClass($class))->isAbstract(); }); } }