@param array  $options
@param string $key
@param null   $default

@return string|null
348074
public static function getString(
        array $options,
        string $key,
        $default = null
    ) {
        if (array_key_exists($key, $options)) {
            return (string)$options[$key];
        }

        return $default;
    }
30561
protected function optional($key, $default = null) {
		if (!array_key_exists($key, $this->strategy)) {
			$this->strategy[$key] = $default;
			return $default;
		}

		else return $this->strategy[$key];
	}
991538
public static function model(string $key, string $default = null)
    {
        return Arr::get(static::$options, 'models.'.$key, $default ?? $key);
    }
298817
public function get($key, $default = null)
    {
        return isset($this->options[$key]) ? $this->options[$key] : $default;
    }
1002396
function get($key, $default = null)
    {
        $index = array_search($key, $this->keys);

        if ($index !== false) {
            return $this->values[$index];
        } else {
            return $default;
        }
    }
1189073
public static function getOption($key = "") {
		
		if (!empty($key)) {
			$arrayFinder = new ArrayFinder(self::$options);
			return $arrayFinder->get($key);
		}
		
		return false;
		
	}
1349250
public function getParam($key, $default = null)
        {
            $key = (string) $key;
            if (isset($this->_params[$key])) {
                return $this->_params[$key];
            }

            return $default;
        }
410866
public function getConfigOption($key, $default = null)
    {
        if (array_key_exists($key, $this->configuration)) {
            return $this->configuration[$key];
        }

        return $default;
    }
943429
public function delete($key, $options = array()) {
        $return= false;
        if ($cache = $this->getCacheProvider($this->getOption(xPDO::OPT_CACHE_KEY, $options), $options)) {
            $return= $cache->delete($key, $options);
        }
        return $return;
    }
152559
public function toJson($key = null, $options = 0)
    {
        if (is_string($key)) {
            return json_encode($this->get($key), $options);
        }
        $options = $key === null ? 0 : $key;
        return json_encode($this->elements, $options);
    }
1332200
public function get( $key, $default = null ) {
		$value = get_option( $this->option_key( $key ) );

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

		return $value;
	}
785658
public function config($key, $default = null)
    {
        // if an array is passed as the key, we will assume you want to set an array of values
        if (is_array($key)) {
            return $this->config = array_merge($this->config, $key);
        }

        return array_key_exists($key, $this->config)
                ? $this->config[$key]
                : $default;
    }
704917
public static function getHeaderOption($header, $key, $default = null)
    {
        $options = self::getHeaderOptions($header);

        if (false === isset($options[$key])) {
            return $default;
        }

        return $options[$key];
    }
105216
static public function get($key = null, $default = null) {
        if (is_null($key)) return json_decode(json_encode(self::$_config));
        
        $config = &self::$_config;
        
        return Utils::arrayGet($config, $key, $default);
    }
729078
public function filter($key, $default = NULL, $filter = FILTER_DEFAULT, $options = array()) {

		$value = $this->get($key, $default);

		// Always turn $options into an array - this allows filter_var option shortcuts.

		if (!is_array($options) && $options) {
			$options = array('flags' => $options);
		}

		// Add a convenience check for arrays.

		if (is_array($value) && !isset($options['flags'])) {
			$options['flags'] = FILTER_REQUIRE_ARRAY;
		}

		return filter_var($value, $filter, $options);

	}
257107
public function getParameter($key, $default = null)
    {
        return isset($this->options[$key]) ? $this->options[$key] : $default;
    }
724222
public function value($key, $default = null)
    {
        return array_key_exists($key, $this->values)
            ? $this->values[$key]
            : $default;
    }