@param string     $key
@param mixed|null $defaultValue

@return mixed
555210
public function optionalItem($key, $defaultValue = null)
    {
        if (!$this->hasItem($key)) {
            return $defaultValue;
        }

        return $this->getItem($key);
    }
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
401138
public function getProperty($key, $defaultValue = null)
    {
        if (array_key_exists($key, $this->storage)) {
            return $this->storage[$key];
        }

        return $defaultValue;
    }
273751
public function Get($Key = NULL, $Default = NULL) {
      if ($Key === NULL)
         return $this->GetRequestArguments (self::INPUT_GET);
      else
         return $this->GetValueFrom(self::INPUT_GET, $Key, $Default);
   }
1229685
final public function when($key, $defaultValue = false)
    {
        $data = $this->data($key, false);
        return !empty($data) ? $data : $defaultValue;
    }
1033872
public function get($key, $defaultValue = array())
    {
        $this->populateFlash($key);

        if ($this->has($key)) {
            return $this->data[$key];
        }

        return $defaultValue;
    }
723479
protected function getParameter($args, $key, $defaultValue = NULL)
    {
        $value = util::array_get($args[$key]);
        return is_null($value) ? $defaultValue : $value;
    }
1158670
public static function getInfo($key = null, $defaultValue = null)
    {
        return null === $key ? static::$_info : array_get(static::$_info, $key, $defaultValue);
    }
1205214
public function translate($key, $defaultValue = '', $locale = null) {
		if ($locale === null) {
			$locale = $this->getlocale();
		}

		if (isset($this->translations[$locale][$key])) {
			return $this->translations[$locale][$key];
		}

		return $defaultValue;
	}
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\"");
    }
1332200
public function get( $key, $default = null ) {
		$value = get_option( $this->option_key( $key ) );

		if ( false === $value ) {
			return $default;
		}

		return $value;
	}
935098
public function get($param, $defaultValue = null)
    {
        return array_key_exists($param, $this->config) ? $this->config[$param] : $defaultValue;
    }
791539
public function getAttribute($key, $defaultValue = null)
    {
        if ($this->hasAttribute($key)) {
            return $this->attributes[$key];
        }

        return $defaultValue;
    }
1014878
public String get(String key, String defaultValue) {
		addToDefaults(key, defaultValue);
		String value = get(key);
		if (value == null) {
			return defaultValue;
		} else {
			return value;
		}
	}
1245274
protected function getRequestParamValue(string $defaultValue = null, string $defaultName = 'id'): ?string
    {
        $paramName = $this->getRequestParamName($defaultName);

        return $this->request->get($paramName, $defaultValue);
    }
1165367
public function getValue($defaultValue = null)
    {
        if ($this->read === false) {
            if (isset($_COOKIE[$this->name])) {
                if ($this->useEncryption === true) {
                    return $this->value = $this->decrypt($_COOKIE[$this->name]);
                }

                return $this->value = $_COOKIE[$this->name];
            }

            return $defaultValue;
        }

        return $this->value;
    }
847358
public function getValueOrDefault($key, $default = null) {
        if (!empty($this->values[$key])) {
            return $this->values[$key];
        }
        elseif (!empty($this->defaults[$key])) {
            return $this->defaults[$key];
        }
        else {
            return $default;
        }
    }