コード例 #1
0
ファイル: ClassCacheTest.php プロジェクト: twhiston/tg
 public function testClearCache()
 {
     $classes = $this->c->getClasses('Command', [__DIR__ . '/assets']);
     $this->assertFileExists($this->location . 'CommandCacheMap.yml');
     $this->c->clearCache(['Command']);
     $this->assertFileNotExists($this->location . 'CommandCacheMap.yml');
 }
コード例 #2
0
ファイル: Tg.php プロジェクト: twhiston/tg
 /**
  * @param CommandLoader $commandLoader
  * @param $locations
  */
 private function addCommands(CommandLoader $commandLoader, $locations, $bypassCache = false)
 {
     $classes = $this->classCache->getClasses('RoboCommand\\', $locations, $bypassCache);
     $commands = $commandLoader->createRoboCommands($classes, $this->passThroughArgs);
     $this->app->addCommands($commands);
     $classes = $this->classCache->getClasses('Command\\', $locations, $bypassCache);
     $commands = $commandLoader->createSymfonyCommands($classes);
     $this->app->addCommands($commands);
 }