@param string $optionName
@param null   $defaultValue

@return mixed|null
777510
protected function getOption(string $optionName, $defaultValue = null)
    {
        return $this->getOptions()->has($optionName) ? $this->getOptions()->get($optionName) : $defaultValue;
    }
1186883
public function setActionOption($actionName, $optionName, $optionValue)
    {
        $this->getAction($actionName)->setOption($optionName, $optionValue);

        return $this;
    }
852620
public String put(String optionName, String optionValue) {
        options.put(optionName, optionValue);
        return optionValue;
    }
640595
final public function getOriginalValue(string $fieldName, $defaultValue = '')
    {
        if (! is_array($this->originalValues) || ! array_key_exists($fieldName, $this->originalValues)) {
            return $defaultValue;
        }
        return $this->originalValues[$fieldName];
    }
918209
public function get(string $optionName)
    {
        $constantName = $this->constantNameFor($optionName);

        if (! defined($constantName)) {
            return null;
        }

        return constant($constantName);
    }
254165
protected function setOptionIfNotSet(array $options, $optionName, $optionDefaultValue)
    {
        if (!isset($options[$optionName])) {
            $options[$optionName] = $optionDefaultValue;
        }

        return $options;
    }
1052129
public function optionModeArray($name, $description, $defaultValue = null)
    {
        $shortcut = null;
        $mode = InputOption::VALUE_IS_ARRAY;
        return [$name, $shortcut, $mode, $description, $defaultValue];
    }
1142808
public function getOptionValue($optionName)
    {
        if (!isset($this->options[$optionName])) {
            throw new \InvalidArgumentException(sprintf('Invalid option name "%s", possible options: %s', $optionName, implode(', ', array_keys($this->options))), __LINE__);
        }
        return array_key_exists('value', $this->options[$optionName]) ? $this->options[$optionName]['value'] : $this->options[$optionName]['default'];
    }
758490
public static function get($name, $defaultValue = null)
    {
        $model = self::find()->where([self::getNameAttribute() => $name])->asArray()->one();
    
        if ($model) {
            return $model[self::getValueAttribute()];
        }
    
        return $defaultValue;
    }
713955
public static function setOption($optionName = "", $optionValue = "") {
		
		if (empty($optionName) || empty($optionValue)) {
			return false;
		}
		
		$arrayFinder = new ArrayFinder(self::$options);
		$arrayFinder->set($optionName, $optionValue);
		self::$options = $arrayFinder->get();
		
	}
271684
public function get($key, $defaultValue = null)
    {
        if (isset($this->session[$key]) && !empty($this->session[$key])) {
            return $this->session[$key];
        }

        return $defaultValue;
    }
631312
public function get($component, $name, $defaultValue = null)
    {
        $this->load();

        $propertyKey = sprintf('%s__%s', $component, $name);

        if (isset($this->properties[$propertyKey])) {
            return $this->properties[$propertyKey]->getValue();
        }

        return $defaultValue;
    }
1286415
public function param(string $name, $defaultValue = null)
    {
        if (array_key_exists($name, $this->parameters)) {
            return $this->parameters[$name];
        }

        return $defaultValue;
    }
175132
public function get(string $optionName)
    {
        foreach ($this->strategies as $strategy) {
            $value = $strategy->get($optionName);

            if (null !== $value) {
                return $value;
            }
        }

        return null;
    }
811150
public function get_courses_display_option($optionname, $defaultvalue = null) {
        if (array_key_exists($optionname, $this->coursesdisplayoptions)) {
            return $this->coursesdisplayoptions[$optionname];
        } else {
            return $defaultvalue;
        }
    }
1064351
public static function Option($optionName = null, $envVariableName = null, $default = false) {
		if (empty($optionName) && empty($envVariableName)) {
			return $default;
		}

		if ($envVariableName == null) {
			$envVariableName = str_replace('-','_', strtoupper($optionName));
		}

		if (is_array($envVariableName)) {
			foreach($envVariableName as $envVariable) {
				$envval = getenv($envVariable);
				if ($envval) {
					return $envval;
				}
			}
		} else {
			$envval = getenv($envVariableName);
			if ($envval) {
				return $envval;
			}
		}

		if (empty($optionName)) {
			return $default;
		}

		return get_option($optionName, $default);
	}
711589
protected function getConfig($key, $defaultValue = null)
    {
        $config = $this->readConfig();
        
        return isset($config[$key]) ? $config[$key] : $defaultValue;
    }