public function getTask($task, array $macroOptions = [])
    {
        $script = Arr::get($this->tasks, $task, '');

        if ($script == '') {
            throw new \Exception(sprintf('Task "%s" is not defined.', $task));
        }

        $options = array_merge($this->getTaskOptions($task), $macroOptions);

        $parallel = Arr::get($options, 'parallel', false);

        $confirm = Arr::get($options, 'confirm', null);

        return new Task($this->getServers($options), $options['as'], $script, $parallel, $confirm);
    }
public function getTask($task, array $macroOptions = [])
    {
        $script = Arr::get($this->tasks, $task, '');

        if ($script == '') {
            throw new \Exception(sprintf('Task "%s" is not defined.', $task));
        }

        $options = array_merge($this->getTaskOptions($task), $macroOptions);

        $parallel = Arr::get($options, 'parallel', false);

        $confirm = Arr::get($options, 'confirm', null);

        return new Task($this->getServers($options), $options['as'], $script, $parallel, $confirm);
    }
public function getTask ( $ task , array $ macroOptions = [ ] ) { $ script = Arr :: get ( $ this -> tasks , $ task , '' ) ; if ( $ script == '' ) { throw new \ Exception ( sprintf ( 'Task "%s" is not defined.' , $ task ) ) ; } $ options = array_merge ( $ this -> getTaskOptions ( $ task ) , $ macroOptions ) ; $ parallel = Arr :: get ( $ options , 'parallel' , false ) ; $ confirm = Arr :: get ( $ options , 'confirm' , null ) ; return new Task ( $ this -> getServers ( $ options ) , $ options [ 'as' ] , $ script , $ parallel , $ confirm ) ; }
Get a Task instance by the given name.

@param  string  $task
@param  array  $macroOptions
@throws \Exception
@return \Laravel\Envoy\Task
Get a Task instance by the given name .