public static function getFromHeaderLine($header_line, $source_url)
    {
        $parts = explode(';', trim($header_line));

        $name = '';
        $value = '';
        $expires = null;
        $path = null;
        $domain = '';

        // Name and value
        preg_match('#([^=]*)=(.*)#', $parts[0], $match);
        $name = trim($match[1]);
        $value = trim($match[2]);

        // Path and Expires
        for ($x = 1; $x < count($parts); ++$x) {
            $parts[$x] = trim($parts[$x]);

            if (preg_match("#^expires\s*=(.*)# i", $parts[$x], $match)) {
                $expires = trim($match[1]);
            }
            if (preg_match("#^path\s*=(.*)# i", $parts[$x], $match)) {
                $path = trim($match[1]);
            }
            if (preg_match("#^domain\s*=(.*)# i", $parts[$x], $match)) {
                $domain = trim($match[1]);
            }
        }

        $expires = str_replace('"', '', $expires);
        $path = str_replace('"', '', $path);
        $domain = str_replace('"', '', $domain);

        return new self($source_url, $name, $value, $expires, $path, $domain);
    }