bf6629660c44d20626cb62c58b47f2711008edec
[mdref/mdref-http] / http / Url / __construct.md
1 # void http\Url::__construct([mixed $old_url = NULL[, mixed $new_url = NULL[, int $flags = http\Url::FROM_ENV]]])
2
3 Create an instance of an http\URL.
4
5 ## Params:
6
7 * Optional mixed $old_url = NULL
8 Initial URL parts. Either an array, object, http\Url instance or string to parse.
9 * Optional mixed $new_url = NULL
10 Overriding URL parts. Either an array, object, http\Url instance or string to parse.
11 * Optional int $flags = http\Url::FROM_ENV
12 The modus operandi of constructing the url. See http\Url constants.
13
14 ## Throws:
15
16 * http\Exception\InvalidArgumentException
17 * http\Exception\BadUrlException
18