コード例 #1
0
ファイル: IdeHelper.php プロジェクト: linusshops/prophet
 public function getFrameworkClassesToGenerate()
 {
     $frameworks = Repository::get()->getFrameworks();
     $classes = [];
     /** @var Framework $framework */
     foreach ($frameworks as $framework) {
         foreach ($framework->getIdeHelperClasses() as $c) {
             require $framework->getPath() . '/vendor/autoload.php';
             $classes[] = new \ReflectionClass($c);
         }
     }
     return $classes;
 }
コード例 #2
0
ファイル: Show.php プロジェクト: linusshops/prophet
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $config = parent::execute($input, $output);
     $frameworks = Repository::get()->getFrameworks();
     $modules = $config->getModules();
     /** @var Module $module */
     foreach ($modules as $module) {
         /** @var Framework $framework */
         $line = $module->getName() . ' ';
         foreach ($frameworks as $framework) {
             if ($framework->validateModule($module)) {
                 $line .= " <info>{$framework->getName()}</info>";
             }
         }
         $output->writeln($line);
     }
 }
コード例 #3
0
ファイル: Init.php プロジェクト: linusshops/prophet
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     /** @var Framework $framework */
     $framework = Repository::get()->getFramework($input->getArgument('framework'));
     $framework->init();
 }
コード例 #4
0
ファイル: Analyze.php プロジェクト: linusshops/prophet
 private function detectModules(OutputInterface $output)
 {
     $finder = new Finder();
     $files = $finder->directories()->in('vendor');
     $paths = array();
     /** @var SplFileInfo $file */
     foreach ($files as $file) {
         if ($output->isVeryVerbose()) {
             $output->writeln($file->getRealPath());
         }
         $frameworks = Repository::get()->getFrameworks();
         /** @var Framework $framework */
         foreach ($frameworks as $framework) {
             if ($framework->validatePath($file->getRealPath())) {
                 $paths[] = array('path' => 'vendor/' . $file->getRelativePathname(), 'framework' => $framework->getName());
             }
         }
     }
     return $paths;
 }