public function set($part, $value)
    {
        if (!in_array($part, self::$parts)) {
            throw new \OutOfBoundsException("$part is not a valid url part");
        }

        $this->components[$part] = $value;
        return $this;
    }