public static function arrayPathGet(array &$array, $path, $glue='.')
    {
        if (!is_array($path)) {
            $path = explode($glue, $path);
        }

        $ref = &$array;

        foreach ((array) $path as $parent) {
            if (is_array($ref) && array_key_exists($parent, $ref)) {
                $ref = &$ref[$parent];
            } else {
                return null;
            }
        }

        return $ref;
    }