Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $httpClient = new Client();
     $client = new KoalaClient($httpClient);
     $systems = $client->getSystemsFromUrl($input->getArgument('url'), true);
     $this->executeSystems($systems, $input->getArgument('exec'), $output, $client);
 }
Ejemplo n.º 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $httpClient = new Client();
     $client = new KoalaClient($httpClient);
     $urls = $client->getUrlsFromUrl($input->getArgument('url'));
     foreach ($urls as $url) {
         $this->executeCommand($output, str_replace('#url#', $url, $input->getArgument('exec')));
     }
 }
Ejemplo n.º 3
0
 /**
  * @param Project[] $projects
  * @param string $command
  * @param array $translation
  * @param OutputInterface $output
  */
 protected function executeProjects(array $projects, $command, OutputInterface $output, Client $client, $withSubsystems = false)
 {
     foreach ($projects as $project) {
         $systems = $client->getSystems($project);
         foreach ($systems as $mainSystem) {
             if ($withSubsystems) {
                 $systemsWithSubSystems = $mainSystem->getSubSystems();
             } else {
                 $systemsWithSubSystems = array();
             }
             $systemsWithSubSystems[] = $mainSystem;
             $this->executeSystems($systemsWithSubSystems, $command, $output);
         }
     }
 }
Ejemplo n.º 4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $httpClient = new Client();
     if ($input->getOption('koalamon_server')) {
         $client = new KoalaClient($httpClient, $input->getOption('koalamon_server'));
     } else {
         $client = new KoalaClient($httpClient);
     }
     if ($input->getOption('with-subsystems')) {
         $withSubsystems = true;
     } else {
         $withSubsystems = false;
     }
     $projects = $client->getProjects(new User($input->getArgument('username'), $input->getArgument('api_key')));
     $this->executeProjects($projects, $input->getArgument('exec'), $output, $client, $withSubsystems);
 }