public static function getValueByPath(array &$array, $path)
    {
        if (is_string($path)) {
            $path = explode('.', $path);
        } elseif (!is_array($path)) {
            throw new \InvalidArgumentException('getValueByPath() expects $path to be string or array, "' . gettype($path) . '" given.', 1304950007);
        }
        $key = array_shift($path);
        if (isset($array[$key])) {
            if (count($path) > 0) {
                return (is_array($array[$key])) ? self::getValueByPath($array[$key], $path) : null;
            } else {
                return $array[$key];
            }
        } else {
            return null;
        }
    }