@param string $key
@param mixed  $defaultValue

@return string
10005
public function getProperty($key, $defaultValue = null)
    {
        if (empty($this->properties[$key])) {
            return $defaultValue;
        }

        return $this->properties[$key];
    }
271684
public function get($key, $defaultValue = null)
    {
        if (isset($this->session[$key]) && !empty($this->session[$key])) {
            return $this->session[$key];
        }

        return $defaultValue;
    }
21652
public function get($key, $defaultValue = null)
    {
        $keyExists = true;
        $parts     = $this->getPath($key);
        $node      = $this->getFromCache();

        foreach($parts as $part) {
            $part = trim($part);

            if (!is_array($node) || !array_key_exists($part, $node)) {
                $keyExists = false;
                break;
            }

            $node = &$node[$part];
        }

        if ($keyExists) {
            return $node;
        } else {
            return $defaultValue;
        }
    }
516138
public function getQueryParameter($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->getParameters)) {
            return $this->getParameters[$key];
        }

        return $defaultValue;
    }
811295
public function &getValue(string $key, $defaultValue = null)
    {
        if ($this->isValidType($defaultValue) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $defaultValue);
        }

        if (isset($this->map[$key]) === false) {
            return $defaultValue;
        }

        return $this->map[$key];
    }
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;
    }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
617491
public static function get(string $key, $defaultValue = null, string $storage = 'global')
    {
        if (!self::has($key)) {
            return $defaultValue;
        }

        // Get content.
        $fileKey = self::key($key);
        $content = null;
        if (file_exists(self::$path . '/' . $storage . '/' . $fileKey)) {
            $content = file_get_contents(self::$path . '/' . $storage . '/' . $fileKey);
        }

        // Extract expiration.
        $markerPos = strpos($content, self::$marker);
        $expiration = null;
        if ($markerPos !== false) {
            $expiration = substr($content, 0, $markerPos);
        }

        // Extract content.
        if ($expiration < time()) {
            self::forget($key);
        } else {
            return unserialize(substr($content, $markerPos + strlen(self::$marker)));
        }

        return $defaultValue;
    }
1245274
protected function getRequestParamValue(string $defaultValue = null, string $defaultName = 'id'): ?string
    {
        $paramName = $this->getRequestParamName($defaultName);

        return $this->request->get($paramName, $defaultValue);
    }
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;
    }
687132
public static function post($key = null, $type = 'string', $defaultValue = '')
    {
        if (!$key) {
            return $_POST;
        }
        return self::typeConvert(isset($_POST[$key]) ? $_POST[$key] : $defaultValue, $type);
    }
859227
public function getHeader($key, $defaultValue = null) {
		if (!is_string($key) || $key === '') {
			return $defaultValue;
		}

		$key = strtoupper(str_replace('-', '_', $key));

		return $_SERVER['HTTP_' . $key] ?? $_SERVER[$key] ?? $defaultValue;
	}
389610
public function translate($key, $defaultValue = '', $locale = null) {
		return $this->translation->translate($key, $defaultValue, $locale);
	}
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
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);
    }
314882
public static function getParam($key, $defaultValue = null) {
		return ArrayHelper::getValue(Yii::$app->params, $key, $defaultValue);
	}
537777
public function getValue(string $key, $defaultValue = null)
    {
        if ($this->offsetExists($key)) {
            return $this->offsetGet($key);
        } else {
            return $defaultValue;
        }
    }