Peridot\Console\ConfigurationReader::callForOption PHP Method

callForOption() protected method

Execute a callback if the input object has a value for the given option name.
protected callForOption ( string $optionName, callable $callable )
$optionName string
$callable callable
    protected function callForOption($optionName, callable $callable)
    {
        $value = $this->input->getOption($optionName);
        if ($value) {
            call_user_func_array($callable, [$value]);
        }
    }