protected function arrayGet(&$source, $key, $default = null)
    {
        if (!$key) {
            return $default;
        }

        if (array_key_exists($key, $source)) {
            return $source[$key];
        }

        $current =& $source;
        foreach (explode('.', $key) as $segment) {
            if (!array_key_exists($segment, $current)) {
                return $default;
            }
            $current =& $current[$segment];
        }

        return $current;
    }