Ejemplo n.º 1
0
 /**
  * Throw an exception if the given workflow does not exist.
  *
  * @author	Andrea Marco Sartori
  * @param	string	$workflow
  * @return	void
  */
 protected function failIfNotExists($workflow)
 {
     if (!$this->pipelines->exists($workflow)) {
         $error = "The workflow [{$workflow}] does not exist.";
         throw new \BadFunctionCallException($error);
     }
 }
Ejemplo n.º 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $workflow = ucfirst($this->argument('name'));
     if (!$this->pipelines->exists($workflow)) {
         return $this->error("The workflow [{$workflow}] does not exist.");
     }
     $this->info($this->drawer->draw($workflow));
 }