Private unsecured function for getFromKey

@param $data
@param $key
@param $default

@return mixed
490596
private static function recursiveGetFromKey($data, $key, $default)
    {
        if (empty($key)) {
            return $data;
        } else {
            $currentKey = array_shift($key);
            return isset($data[$currentKey]) ? self::recursiveGetFromKey($data[$currentKey], $key, $default) : $default;
        }
    }
1219475
public function getSafeRedirectUrl($default, $data = null, $key = 'redirect') {
		$redirectUrl = $data ?: ($this->Controller->getRequest()->getData($key) ?: $this->Controller->getRequest()->getQuery($key));
		if ($redirectUrl && (mb_substr($redirectUrl, 0, 1) !== '/' || mb_substr($redirectUrl, 0, 2) === '//')) {
			$redirectUrl = null;
		}

		return $redirectUrl ?: $default;
	}
1212527
public static function getContextDataByKey(string $key, $default = null)
    {
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY][$key])) {
            return self::$context[$coroutineId][self::DATA_KEY][$key];
        }

        return $default;
    }
478317
public static function getValueByKey($data, $key = null, $default = null)
    {
        if (!isset($key) || empty($key)) {
            return $data;
        }

        if (is_array($key)) {
            $keys = $key;
        } else {
            $keys = explode('.', $key);
        }

        $item = $data;
        foreach ($keys as $keyName) {
            if (is_array($item)) {
                if (isset($item[$keyName])) {
                    $item = $item[$keyName];
                } else {
                    return $default;
                }
            } else if (is_object($item)) {
                if (isset($item->$keyName)) {
                    $item = $item->$keyName;
                } else {
                    return $default;
                }
            }

        }

        return $item;
    }
635198
public function get( $key, $default = null ) 
	{
		if ( !isset( $this->GET[$key] ) ) 
		{
			return $default;
		}
		return $this->GET[$key];
	}
1283114
public function get(string $key, $default = null)
    {
        return $this->data[$key]
            ?? $this->data[self::FLASH][$key]
            ?? $this->flash[$key]
            ?? $default;
    }
474699
public function getRaw($key, $default = null)
    {
        $result = ArrayUtility::dotRead($this->data, $this->getNormalizedKey($key));
        if ($result === null) {
            return $default;
        }

        return $result;
    }
701121
public function get($key, $default = null) {
		$this->loadIfNeeded();

		return isset($this->array[$key]) ? $this->array[$key] : $default;
	}
718822
public static function get($key, $default = null)
    {
        if (is_null($key)) {
            return $default;
        }

        return (isset($_GET[$key]) ? $_GET[$key] : $default);
    }
1109573
public function getFromCache($key, $default = null)
    {
        $key = $this->getConfigBasedCachePrefix() . $key;

        return $this->getFromCacheOld($key, $default);
    }
810783
private function get($key, $default = null)
    {
        if (isset($this->responseData['error'][$key])) {
            return $this->responseData['error'][$key];
        }

        return $default;
    }
296045
public function get($key, $default = null)
    {
        $value = parent::get($key, $default);
        if (is_array($value)) {
            $value = array_shift($value);
        }
        return $value;
    }
1009800
public function getData($key = null, $default = null)
    {
        if (is_null($key)) {
            $data = [];

            foreach ($this->data as $key => $value) {
                $data[$key] = $value->getValue();
            }

            return $data;
        }

        $data = $this->findData($key);

        return isset($data) ? $data->geteValue() : $default;
    }
273357
public function get($key, $default = null)
    {
        $key = $this->resolveAlias($key);

        $accessor = 'get' . $this->toCamelCase($key) . 'Value';

        $value = isset($this->data[$key]) ? $this->data[$key] : null;

        if (is_callable([$this, $accessor])) {
            return $this->$accessor($value);
        }

        if ($cast = $this->getCast($key)) {
            $value = $this->castValue($key, $value);
        }

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

        return $value;
    }
656646
public function get($key, $default = null) {
        if (strpos($key, '.') === false) {
            $value = isset($this->_data[$key]) ? $this->_data[$key] : null;
        } else {
            $value = Hash::get($this->_data, $key);
        }

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

        return $value;
    }
397532
public function getData($key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->data;
        }
        if (! $this->hasData($key)) {
            return $default;
        }

        return $this->data[$key];
    }
1286686
public function get($key, $default = null)
    {
        $this->checkLoaded();

        return Arr::get($this->data, $key, $default);
    }