Returns default if options is not found.

@param \Symfony\Component\Console\Input\InputInterface $input
@param string                                          $name
@param bool                                            $default

@return bool
328979
private static function getOption(InputInterface $input, string $name, bool $default = false): bool
    {
        return $input->hasOption($name) ? (bool) $input->getOption($name) : $default;
    }
72678
protected function getConfiguration(InputInterface $input): ConsoleConfigInterface
    {
        // If the configuration to use is the default.
        if ($input->getOption('default')) {
            $this->validatePathsExist($input);
            // If it is a directory.
            if ($input->getOption('dir')) {
                return (new DefaultConsoleConfigFactory())
                    ->invokeDir($input->getArgument('source'), $input->getArgument('target'));
            }
            return (new DefaultConsoleConfigFactory())
                ->invokeFile($input->getArgument('source'), $input->getArgument('target'));
        }

        $path = $input->getOption('config');
        // If we have a "=" at the beginning of the option value
        $path = preg_replace('/^\=/', '', $path);

        $factory = $this->getConfigurationFactory($path);

        if ($input->getOption('dir')) {
            $this->validatePathsExist($input);
            return $factory->invokeDir(
                $path,
                $input->getArgument('source'),
                $input->getArgument('target')
            );
        }
        if ($input->getOption('file')) {
            $this->validatePathsExist($input);
            return $factory->invokeFile(
                $path,
                $input->getArgument('source'),
                $input->getArgument('target')
            );
        }
        return $factory->invoke($path);
    }
234732
public function getArgument($name, $default = null) {
        try {
            $argument = $this->getCommand()->findArgument($name);
            $value = $argument->getValue();

            if ($value === null) {
                $value = $default;
            }

            return $value;
        } catch (ArgumentNotFoundException $ex) {}

        return $default;
    }
1348143
protected function hasInputOption($option, $input)
    {
        return $input->hasOption($option) && null !== $input->getOption($option);
    }
1240878
public static function icfg($name, $default = 0) {
        if ($name == null) {
            return $default;
        } else {
            $val = App::cfg($name, $default);

            return intval($val);
        }
    }
193014
public final function getOption($name)
    {
        return isset($this->_options[$name]) ? $this->_options[$name] : null;
    }
1280807
public function getOption(string $name, $default = null)
    {
        if (!$this->hasOption($name)) {
            return $default;
        }

        return $this->_options[$name];
    }
1157069
public static function select(String $name = NULL)
    {
        $name  = self::$settings['name']  ?? $name;
        $input = self::$settings['input'] ?? false;

        self::$settings = [];

        return Method::$input($name);
    }
1349620
protected function getParameter($name, $default = null)
    {
        return array_key_exists($name, $this->params)?$this->params[$name]:$default;
    }
266152
public function get($name, $default = null)
    {
        if ($this->isError()) {
            if (array_key_exists($name, (array)$this->getErrorData())) {
                return $this->getErrorData()[$name];
            }
        } else {
            if (array_key_exists($name, (array)$this->getResult())) {
                return $this->getResult()[$name];
            }
        }

        return $default;
    }
411010
public function getActionParam($name, $default = null)
    {
        $params = $this->getActionParams();
        return isset($params[$name]) ? $params[$name] : $default;
    }
1008892
public function getOption($name, $default = null)
    {
        $config = $this->getConfig();

        return array_key_exists($name, $config) ? $config[$name] : $default;
    }
1351135
protected function getConfig(InputInterface $input)
    {
        /** @var $helper ConfigurationHelper */
        $helper = $this->getHelper('config');

        return $helper->loadFile($input->getOption('configuration'));
    }
531546
public function get(string $name, $default = null)
    {
        if (!isset($this->configs[$name])) {
            $this->set($name, $default);
        }
        return $this->configs[$name];
    }
1350772
public function get($name, $default = false) {
        $result = $this->handler->get($name);
        return false !== $result ? $result : $default;
    }
719482
public function getParameter($name, $default = NULL)
	{
		if (isset($this->params[$name])) {
			return $this->params[$name];

		} else {
			return $default;
		}
	}
717549
private function getOption(string $name)
    {
        return $this->input->hasOption($name) ? $this->input->getOption($name) : null;
    }