Example #1
0
 protected function loadRoboFile()
 {
     if (!file_exists($this->file)) {
         $this->output->writeln(sprintf('<comment>%s could not be found</comment>', $this->file));
         $dialog = new \Symfony\Component\Console\Helper\DialogHelper();
         if ($dialog->askConfirmation($this->output, sprintf("<question>Should I create %s? (y/n)</question> ", $this->file), false)) {
             $this->initRoboFile();
         }
         exit;
     }
     require_once $this->file;
     if (!class_exists(self::ROBOCLASS)) {
         $this->output->writeln("<error>Class " . self::ROBOCLASS . " was not loaded</error>");
         return false;
     }
     return true;
 }