Gets the value on requested key. First argument is key's name, second argument is default value you want
to get if key is not set.

@param string $key
@param mixed $defaultValue

@return mixed
@throws ConfigException
180672
public function get(string $key, $defaultValue = null)
    {
        if (!is_array($this->data)) {
            throw new ConfigException('Unable to get config data when config wasn\'t loaded for config name=' . $this->name);
        }

        if (!array_key_exists($key, $this->data)) {
            return $defaultValue;
        }

        if (!$this->isPointerConfig()) {
            return $this->data[$key];
        } else {
            // this is pointer config, let's examine what we have
            $counter = 0;

            do {
                if (!isset($this->data[$key])) {
                    throw new ConfigException("Trying to get non-existing config key={$key} in config name={$this->name()} after {$counter} 'redirects'");
                }

                $config = $this->data[$key];

                if (!is_string($config)) {
                    return $config;
                } else {
                    $key = $config;
                }
            } while ($counter++ < 10);
        }

        // if you get to this line, then something is wrong
        throw new ConfigException("{$this} has too many \"redirects\"");
    }
1186876
public static function getParam($key, $defaultValue = null, $module = null)
    {
        if(null !== $module) {
            return self::getParam(strtolower($module) . '.' . $key, self::getParam($key, $defaultValue));
        }
        $param = self::getInstance()->get($key);
        return (null !== $param) ? $param : $defaultValue;
    }
401138
public function getProperty($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->storage)) {
            return $this->storage[$key];
        }

        return $defaultValue;
    }
79675
protected function input($key = null, $defaultValue = null)
    {
        return is_null($key) ? $_REQUEST : fnGet($_REQUEST, $key, $defaultValue);
    }
696289
public function getArg($name, $defaultValue = null)
    {
        if (array_key_exists($name, $this->args)) {
            return $this->args[$name];
        }

        return $defaultValue;
    }
862214
public function get($index, $defaultValue = null)
    {
        if (isset($this->{$index})) {
            return $this->{$index};
        }

        $config = $this;
        $keys = explode('.', $index);

        while (!empty($keys)) {
            $key = array_shift($keys);

            if (!isset($config->{$key})) {
                break;
            }

            if (empty($keys)) {
                return $config->{$key};
            }

            $config = $config->{$key};

            if (empty($config)) {
                break;
            }
        }

        return $defaultValue;
    }
985581
public function get($key, $defaultValue = null)
    {
        if ($this->has($key)) {
            return $this->attributes[$key];
        }

        return $defaultValue;
    }
27455
public static function getInfo( $key = null, $defaultValue = null )
    {
        return null === $key ? static::$_info : Option::get( static::$_info, $key, $defaultValue );
    }
935992
public function getParameter($parameterName, $defaultValue = null)
    {
        if ($this->getConfigResolver()->hasParameter($parameterName)) {
            return $this->getConfigResolver()->getParameter($parameterName);
        }

        return $defaultValue;
    }
612263
public int get(int key, int defaultValue) {
    int index = getKeyIndex(key);
    if (index >= 0) {
      return values[index];
    } else {
      return defaultValue;
    }
  }
1286415
public function param(string $name, $defaultValue = null)
    {
        if (array_key_exists($name, $this->parameters)) {
            return $this->parameters[$name];
        }

        return $defaultValue;
    }
668617
protected function getConfigValue($key, $default = null)
    {
        if (Arr::has($this->normalizedConfig, $key)) {
            return Arr::get($this->normalizedConfig, $key);
        }

        return $this->getFallbackConfigValue($key, $default);
    }
372878
public static function get($key, $default = NULL) {
        if (isset(self::$configs[$key]))
            return self::$configs[$key];

        return $default;

    }
1169742
public function get($keyName, $defaultValue = null)
    {
        $this->initList();
        $keyName = strtolower($keyName);
        if (empty($this->list[$keyName])) {
            return $defaultValue;
        }
        return $this->list[$keyName];
    }
107140
public function read(string $key, $defaultValue = null)
    {
        return isset($_SESSION[$key]) ? $_SESSION[$key] : $defaultValue;
    }
314882
public static function getParam($key, $defaultValue = null) {
		return ArrayHelper::getValue(Yii::$app->params, $key, $defaultValue);
	}
1131799
private function getDefaultValue($key, $default = null)
    {
        $value = null === $default && \array_key_exists($key, $this->defaults)
            ? $this->defaults[$key]
            : $default;

        return $this->getByManager($key, $value, $default);
    }