Method to build getopt parameter postfix for option
@param Option $Option instance of option
@return string getopt parameter postfix for option
174416
private static function getPostfix(Option $Option) {
        $postfix = '';
        if ($Option->getType() == Option::TYPE_STRING) {
            $postfix .= ':';
            if (!$Option->isRequired()) {
                $postfix .= ':';
            }
        }
        return $postfix;
    }
156296
public function getConfiguration($option = null)
    {
        if (!is_null($option)) {
            return $this->options[$option];
        }

        return $this->options;
    }
311769
public static function getVersion (string $option = 'FULL') : string
    {
        if ($option === 'MAJOR') :
            $version = explode('.', self::VERSION);
            return $version[0].'.'.$version[1];
        else :
            return self::VERSION;
        endif;
    }
525028
public function parseOption($optionName)
    {
        return $this->input->getOption($optionName) || isset($this->fileConfig['options'][$optionName]);
    }
1053362
protected function getPackageOptionFile($option)
    {
        $option = $this->getPackageOption($option);

        if ($option && file_exists($this->getPackageDir().$option)) {
            return $option;
        }

        return '';
    }
1062918
protected static function getOption($optionName, $castToInt = true)
    {
        $optionValue = isset(self::$options[$optionName])
            ? self::$options[$optionName]
            : get_option($optionName);

        return $castToInt === true ? (int) $optionValue : $optionValue;
    }
1209800
public function get(string $option)
    {
        if (!isset($this->options[$option])) {
            throw new \InvalidArgumentException(sprintf('Option "%s" does not exists.', $option));
        }

        return $this->options[$option];
    }
1254706
public function getOptionFromDboptions($option, InputInterface $input)
    {
        $dbOptionReturnValue = null;
        if (!empty($input->getOption('dboptions'))) {
            $dbOptions = explode(',', $input->getOption('dboptions'));
            if (is_array($dbOptions)) {
                foreach ($dbOptions as $dbOption) {
                    $dbOptionParts = explode(':', $dbOption);
                    if (!empty($dbOptionParts[1])) {
                        $dbOptionValue = $dbOptionParts[1];
                    }
                    if ($option === $dbOptionParts[0]) {
                        if (!empty($dbOptionValue)) {
                            $dbOptionReturnValue = $dbOptionValue;
                        } else {
                            $dbOptionReturnValue = true;
                        }
                    }
                }
            }
        }
        return $dbOptionReturnValue;
    }
321018
public function getName($option = null){
		if(empty($option)){
			$option = $this->getOptions();
		}
		$name = $option->getName();
		if (empty($name)) {
			throw new \Exception('Empty name');
		}
		return $name;
	}
1217878
protected function _parseLongOption($option, $params)
    {
        $name = substr($option, 2);
        if (strpos($name, '=') !== false) {
            list($name, $value) = explode('=', $name, 2);
            array_unshift($this->_tokens, $value);
        }

        return $this->_parseOption($name, $params);
    }
544559
public function getInfo($option = 0)
    {
        if (0 === $option) {
            return curl_getinfo($this->curl);
        }

        return curl_getinfo($this->curl, $option);
    }
624425
protected function getOptionsString()
    {
        $value   = $this->getValue();
        $options = '';
        if ($this->get('_first_option')) {
            $options .= sprintf('<option value="">%s</option>', $this->get('_first_option'));
        }
        $optionsList = $this->get('_options') ?: array();
        foreach ($optionsList as $k => $v) {
            $selected = '';
            // be flexible, accept a non-array value
            if ((is_string($value) && $k == $value) || (is_array($value) && in_array($k, $value))) {
                $selected = 'selected="selected"';
            }
            $options .= sprintf('<option value="%s" %s>%s</option>', htmlentities($k, ENT_COMPAT), $selected, $v);
        }

        return $options;
    }
1044510
private function getInputOptionData(InputOption $option)
    {
        return array(
            'name' => '--'.$option->getName(),
            'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
            'accept_value' => $option->acceptValue(),
            'is_value_required' => $option->isValueRequired(),
            'is_multiple' => $option->isArray(),
            'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()),
            'default' => $option->getDefault(),
        );
    }
1185635
public function getOption($name, $option = null)
    {
        $postTypes = Configure::read('CA.PostTypes');

        if (array_key_exists($name, $postTypes)) {
            if ($option) {
                if (array_key_exists($option, $postTypes[$name])) {
                    return $postTypes[$name][$option];
                }
            }
            return $postTypes[$name];
        }
        return false;
    }
951334
public function getOption($optionName)
    {
        return (isset($this->service[$this->currentService]['options'][$optionName]))
            ? $this->service[$this->currentService]['options'][$optionName]
            : null;
    }
206170
protected function getOption($option, $default = false)
    {
        return isset($this->options[$option])? $this->options[$option] : $default;
    }
94158
protected function getOptionNotation(OptionInterface $option): string
    {
        $multiple = $option->isMultiple();
        $short = $option->getShort();
        $long = $option->getLong();
        $flag = $option->isFlag();

        $notation = '';
        if ($short !== null) {
            $notation .= '-' . $short;

            if ($flag === false) {
                $notation .= '=';
            } elseif ($multiple === true) {
                $notation .= '+';
            }
        }

        if ($long !== null) {
            if (strlen($notation) > 0) {
                $notation .= '|';
            }

            $notation .= '--' . $long;

            if ($flag === false) {
                $notation .= '=';
            } elseif ($multiple === true) {
                $notation .= '+';
            }
        }

        return $notation;
    }