execute this task pre setted.

@param   array|Samurai\Samurai\Component\Task\Option $option
960682
public function execute($options = [])
    {
        if (! is_array($options) && ! $options instanceof Option) throw new \InvalidArgumentException('invalid option');
        if (! $this->do) throw new \Samurai\Samurai\Exception\LogicException('preset task something do.');

        $option = $this->getOption($this->do);
        if (is_array($options)) {
            $option->importFromArray($options);
        } else {
            $option->import($options);
        }
        $option->validate();
        $this->{$this->do . 'Task'}($option);
    }
445653
public function startTask($task, array $options = [])
    {
        ob_start() && $this->taskStack[] = $task;

        $this->taskOptions[$task] = $this->mergeDefaultOptions($options);
    }
1155546
public function setOption($option = [])
    {
        if (!isset($option['sandbox'])) {
            $option['sandbox'] = false;
        }
        $this->provider->setOption($option);
    }
108002
public function checkOption($option)
    {
        $option = $this->fixStepArgument($option);
        $this->getSession()->getPage()->checkField($option);
    }
260810
public function execute()
    {
        $hook = preg_replace('/rocketeer\.(commands|tasks)\.(.+)/', '$2', $this->event->getName());
        $hook = explode('.', $hook);
        $hook = $hook[1].'_'.$hook[0];

        $this->prepareThenSend($hook);
    }
607010
public function loadTask(Option $option)
    {
        $databases = $this->getDatabases($option);

        $start = microtime(true);
        foreach ($databases as $alias => $database) {
            $manager = $this->getManager($alias, $database);

            $schemaFile = $this->migrationHelper->getSchemaFile($alias);
            $this->console->log($schemaFile);
            
            try {
                $this->sendMessage('schema loading... -> %s', $schemaFile);
                $manager->loadSchema($this->application->getEnv(), $schemaFile);
            } catch (\Exception $e) {
                $this->sendMessage($e->getMessage());
                $this->sendMessage('has error. aborting.');
                return;
            }
        }
        $end = microtime(true);

        $this->sendMessage('');
        $this->sendMessage('All Done. Took %.4fs', $end - $start);
    }
622470
public function selectOption($select, $option) {
		// Find field
		$field = $this
			->getSession()
			->getPage()
			->findField($this->fixStepArgument($select));

		// If field is visible then select it as per normal
		if($field && $field->isVisible()) {
			parent::selectOption($select, $option);
		} else {
			$this->selectOptionWithJavascript($select, $option);
		}
	}
1080237
protected function autoValidate($option)
    {
        list($validate, $scene, $message, $batch) = $option;

        if (is_array($validate)) {
            // 指定验证规则
            $v = $this->app->validate();
            $v->rule($validate);
        } else {
            // 调用验证器
            $v = $this->app->validate($validate);
            if (!empty($scene)) {
                $v->scene($scene);
            }
        }

        if (!empty($message)) {
            $v->message($message);
        }

        // 批量验证
        if ($batch) {
            $v->batch(true);
        }

        if (!$v->check($this->request->param())) {
            throw new ValidateException($v->getError());
        }
    }
670522
public function setOption(string $option, $value) {
        $this->validateOption($option, $value);
        $this->options[$option] = $value;
    }
121071
public function execute($options = array())
    {
        $message = $options['message'];
        $receivers = isset($options['attributes']) ? $options['attributes'] : array();

        $options['provide_link'] = true;
        foreach ($receivers as $receiver) {
            $this->sendMail($message, $receiver, $options);
        }
        // Message is handled, put in the archive
        $message->setState('ARCHIVED');
    }
615419
public function execute(array $options = array())
	{
		// Validate that the contrast value exists and is an integer.
		if (!isset($options[IMG_FILTER_CONTRAST]) || !is_int($options[IMG_FILTER_CONTRAST]))
		{
			throw new InvalidArgumentException('No valid contrast value was given.  Expected integer.');
		}

		// Perform the contrast filter.
		imagefilter($this->handle, IMG_FILTER_CONTRAST, $options[IMG_FILTER_CONTRAST]);
	}
819599
public function execute(array $args = [], array $options = [])
    {
        if (!$this->evaluate($this->condition)) {
            return;
        }

        $this->command->execute($args, $options);
    }
720989
public function setOption($option, $value = null)
    {
        if (is_array($option)) { // If it's an array, loop through each option and call this method recursively.
            foreach ($option as $opt => $val) {
                $this->setOption($opt, $val);
            }
            return;
        }

        if (array_key_exists($option, $this->defaults)) { // If it is a default value.
            throw new ProtectedOptionException(sprintf('Unable to set protected option #%u', $option));
        }

        if (curl_setopt($this->handle, $option, $value) === false) {
            throw new CurlErrorException(sprintf('Couldn\'t set option #%u', $option));
        }
    }
776936
public function setOpt($option, $value)
    {
        /**
         * @var Curl $instance
         */
        foreach ($this->curlInstances as $instance) {
            $instance->setOpt($option, $value);
        }
    }
576308
def handle_option(self, opt):
        """"""
        self.options.append(opt)
        log.debug('options: %s', self.options)
312457
function Tasks (options) {
  var me = this;

  // properties
  this.tasks = {};
  this.options = {
    run: 'auto' // can be 'auto' or 'manual'
  };
  this.executed = false;

  // set options
  if (options) {
    this.setOptions(options);
  }

  // execute a function on next process tick which will execute the tasks
  // (when configured to be executed automatically)
  if (process && process.nextTick) {
    process.nextTick(function () {
      if (me.options.run == 'auto') {
        me.run();
      }
    });
  }
}
668861
public function execute(array $args = [], array $options = [])
    {
        foreach ($this->sequence as $command) {
            $command->setConfig($this->getConfig());
            $command->setConfigService($this->getConfigService());
            if ($this->hasOutput() && method_exists($command, 'setOutput')) {
                $command->setOutput($this->getOutput());
            }
            if ($this->hasInput() && method_exists($command, 'setInput')) {
                $command->setInput($this->getInput());
            }
            $command->execute($args, $options);
        }
    }