Allows accessing an array with a path like construct: /elm1/elm2/elm3 == [elm1][elm2][elm3]

@param string $path
@param array $array
@param null $default
@param string $operator

@return null
513101
public static function getValueByPath($path, array $array, $default = null, $operator = '/')
    {
        //handle indexes containing a /
        if (isset($array[$path])) {
            return $array[$path];
        }
        //check if $path contains a /
        $pos = strpos($path, $operator);
        //exit condition
        if ($pos === false) {
            return array_key_exists($path, $array) ? $array[$path] : $default;
        }
        $current = substr($path, 0, $pos);

        if (!array_key_exists($current, $array)) {
            return null;
        }

        //recursion
        return self::getValueByPath(substr($path, $pos+1), $array[$current], $default, $operator);
    }
1106058
public function get($path, $default=Null)
    {
        $current = $this->data;
        $p = strtok($path, '.');

        while ($p !== false) {
            if (!isset($current[$p])) {
                return is_null($default) ? $this->getDefault($path) : $default;
            }
            $current = $current[$p];
            $p = strtok('.');
        }

        return $current;
    }
371109
public static function get($arr, $str_path, $default=null) {
		$path = explode('.', $str_path);
		return static::array_get($arr, $path, $default);
	}
582686
public static function arrayGet(array $array, $key, $default = null)
    {
        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (!is_array($array) || !array_key_exists($segment, $array)) {
                return $default;
            }

            $array = $array[$segment];
        }

        return $array;
    }
1297806
public static function get(array $array, $key, $default = null)
    {
        if (array_key_exists($key, $array)) {
            return $array[$key];
        }

        if (strpos($key, '.') === false) {
            return $default;
        }

        foreach (explode('.', $key) as $segment) {
            if (is_array($array) && array_key_exists($segment, $array)) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }
528132
public function get($path, $default = null, $associative_return = false, $default_on_404 = true)
	{
		try {
			return $this->call(self::GET, $path, null, $associative_return);
		} catch (StatusCodeException $e) {
			if ($e->getCode() !== 404 || !$default_on_404) {
				throw $e;
			}
		}

		return $default;
	}
862598
public function pull($path, $default = null)
	{
		return Arr::pull($this->items, $this->keyFor($path), $default);
	}
116100
public static function get(array $array, string $key = null, $default = null)
    {
        if ($key === null) {
            return $array;
        }

        if ($array === []) {
            return $default;
        }

        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (\explode('.', $key) as $segment) {
            if (\is_array($array) && isset($array[$segment])) {
                $array = $array[$segment];
            } else {
                return $default;
            }
        }

        return $array;
    }
808044
public static function get($array, $key, $default = null)
    {
        if (null === $key) {
            return $array;
        }

        if (isset($array[$key])) {
            return $array[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (static::accessible($array) && static::exists($array, $segment)) {
                $array = $array[$segment];
            } else {
                return value($default);
            }
        }

        return $array;
    }
922138
public static function path(&$array, $path = array(), $value = '>-null-<')
    {
        return $value !== '>-null-<'
            ? self::pathSet($array, $path, $value)
            : self::pathGet($array, $path);
    }
830930
public function get(array $array, $keys, $default = null)
    {
        $keys = $this->parseKeys($keys);

        if (is_array($array) && $keys) {
            $key = array_shift($keys);
            if (array_key_exists($key, $array)) {
                $value = $array[$key];
                if (!$keys) {
                    return $value;
                }

                if (is_array($value)) {
                    return $this->get($value, $keys, $default);
                }
            }
        }

        return $default;
    }
264625
private static function associateNumericKeys($array, $default=true) {
		if (is_string($array)) {
			$array = [$array => $default];
		} else {
			foreach ($array as $key=>$value) {
				if (is_int($key)) {
					$array[$value] = $default;
					unset($array[$key]);
				}
			}
		}
		return $array;
	}
755570
protected function arrGet(array $storage, $path, $default)
    {
        if ($path === null)
        {
            return $storage;
        }

        return $this->helper->arr()->get($storage, $path, $default);
    }
1108350
public function get($path, $default = null)
    {
        $keys       = $this->explode($path);
        $parameters = $this->parameters;

        foreach ($keys as $key) {
            if (isset($parameters[$key])) {
                $parameters = $parameters[$key];
            } else {
                return $default;
            }
        }
        return $parameters;
    }
255603
public function path(array $values, $operator)
    {
        if (!in_array($operator, array('=', '!='))) {
            return $this->translation->text('Unsupported operator');
        }

        foreach ($values as $pattern) {
            if (!gplcart_string_is_regexp($pattern)) {
                return $this->translation->text('@field has invalid value', array(
                    '@field' => $this->translation->text('Condition')));
            }
        }

        return true;
    }
471607
private function resolvePath(array $value, string $path)
    {
        $path = preg_replace('/\[(.*?)\]/', '.$1', $path);
        $path = explode('.', $path);

        foreach ($path as $item) {
            if (is_array($value) && isset($value[$item])) {
                $value = $value[$item];
            } else {
                return null;
            }
        }

        return $value;
    }
311713
public static function getInt(array $array, $key, int $default = 0) : int
    {
        $key = (string) $key;

        if ($array[$key] ?? 0) {
            return (int) $array[$key];
        }

        return $default;
    }