Esempio n. 1
0
 /**
  * Execute the Project Selection
  *
  * @param array $argumentData Argument data
  *
  * @return bool Stop/Don't stop execution
  */
 public function execute($argumentData)
 {
     if (count($argumentData) != 2) {
         throw new \RuntimeException('Project argument requires a project name.');
         return false;
     }
     \Usher\Lib\Console::setOption('selectedProject', $argumentData[1]);
     return true;
 }
Esempio n. 2
0
 /**
  * Execute the TaskDir option
  *
  * @param array $argumentData Argument data
  *
  * @return bool Stop/Don't stop execution
  */
 public function execute($argumentData)
 {
     $directory = $argumentData[1];
     if (!is_dir($directory)) {
         throw new \RuntimeException('Tasks directory "' . $directory . '" could not be accessed.');
     }
     \Usher\Lib\Console::setOption('customTaskDir', $directory);
     \Usher\Lib\Loader::registerAutoload(array(__CLASS__, 'autoload'));
     return true;
 }
Esempio n. 3
0
 /**
  * Execute the Help option
  *
  * @param array $argumentData Argument data
  *
  * @return bool Stop/Don't stop execution
  */
 public function execute($argumentData)
 {
     // if the config file is valid set it
     $configFilePath = isset($argumentData[1]) ? $argumentData[1] : null;
     if ($configFilePath !== null && is_file($configFilePath)) {
         \Usher\Lib\Console::setOption('configFilePath', $configFilePath);
     } else {
         throw new \RuntimeException('Could not set configuration: "' . $configFilePath . '"');
     }
     return true;
 }
Esempio n. 4
0
 /**
  * Execute the Help option
  *
  * @param array $argumentData Argument data
  *
  * @return bool Stop/Don't stop execution
  */
 public function execute($argumentData)
 {
     \Usher\Lib\Console::setOption('logFile', $argumentData[1]);
     return true;
 }
Esempio n. 5
0
 /**
  * Execute the Help option
  *
  * @param array $argumentData Argument data
  *
  * @return bool Stop/Don't stop execution
  */
 public function execute($argumentData)
 {
     \Usher\Lib\Console::setOption('runQuiet', true);
     return true;
 }