Returns the value of the given key filtered to an int or float.

If the key does not exist or the value is empty the given default is returned.

@param string         $key
@param int|float|null $default

@return int|float|null
976824
public static function getNumeric($key, $default = null)
    {
        $value = ini_get($key);

        return $value === false || $value === '' ? $default : $value + 0;
    }
217150
public function get(string $key,string $default=null)
  {
    $keys = explode('.',$key);
    $val = $this->confValues;

    for ($i=0; $i<count($keys); $i++) {
      $val = ( $val[ $keys[$i] ] ?? null);
      if (is_null($val)) break;
    }

    return $val ?? $default;
  }
154572
public function get($key, $default = null) {
		$key = $this->getKey($key);
		$result = getConf($key);
		return $result === null ? $default : $result;
	}
718822
public static function get($key, $default = null)
    {
        if (is_null($key)) {
            return $default;
        }

        return (isset($_GET[$key]) ? $_GET[$key] : $default);
    }
1050953
public function get($key, $default = null) {
        if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key));
        // TODO: a numerically indexed property array will have integer keys

        $notFound = false;
        $value = $this->getProperty($key, $notFound);

        if ($notFound) {
            if (func_num_args() == 1) throw new RuntimeException('No configuration found for key "'.$key.'"');
            return $default;
        }
        return $value;
    }
1250709
public function getOne($key, $default = null)
    {
        $ret = $default;
        $all = $this->get($key);
        if (count($all) > 0) {
            $ret = array_shift($all);
        }

        return $ret;
    }
724222
public function value($key, $default = null)
    {
        return array_key_exists($key, $this->values)
            ? $this->values[$key]
            : $default;
    }
1044462
public function get($key, $default = null)
	{
        $value = $this->settings;
        $value = set_nested_array_value($value, $key);

        if ( ! is_null($value))
        {
            return $value;
        }

        return $default;
	}
1321396
public function getFloatValue($key)
    {
        $value = $this->get($key);
        if ($value === null) {
            return null;
        }
        return (float)$value;
    }
154157
public function getInt(string $key, int $defaultValue = 0): int
    {
        return intval($this->get($key, $defaultValue));
    }
585184
public  function getFloat($key, float $default_value = NULL)
    {
        $value = $this->getPropertyNodeValue($key);

        // return default value if the element is null
        if ( NULL === $value ){
            return NULL === $default_value ? NULL : $default_value;
        }

        return floatval($value);
    }
937668
public function get($key, $default = null)
    {
        $key = strtolower($key);

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

            return $default;
        }

        return $this->data[$key];
    }
197821
public function get($key, $default = null)
    {
        if (array_key_exists($key, $this->context)) {
            return $this->context[$key];
        }

        return $default;
    }
1278076
public function get($key, $default = null)
    {
        list($baseKey, $searchKey) = $this->fetchKey($key);

        $value = $this->fetchValue($baseKey, $searchKey);

        return (! is_null($value)) ? $value : $default;
    }
1359739
protected function value(string $key, $default)
    {
        $value = $this->queryRelate->getQuery()->value($key);

        $this->resetQueryRelate();

        if (empty($value)) {
            $value = $default;
        }

        return $value;
    }
392485
public function get($key, $default = null)
    {
        if (false === $this->getIsWorking()) {
            return $default;
        }
        $id = $this->buildKey($key);
        $value = $this->getValue($id);
        if (null === $value) {
            return $default;
        }
        return $this->decodeSaveValue($value);
    }
476090
public function get(string $key, $default = null)
    {
        $k = $this->keyConvert($key);
        $v = getenv($k);
        return $v !== false ? $v : $default;
    }