thanks git
[mdref/mdref-http] / http / Url / __construct.md
1 # void http\Url::__construct([mixed $old_url = NULL[, mixed $new_url = NULL[, int $flags = 0]]])
2
3 Create an instance of an http\Url.
4
5 > ***NOTE:***
6 > Prior to v3.0.0, the default for the $flags parameter was http\Url::FROM_ENV.
7
8 See also http\Env\Url.
9
10 ## Params:
11
12 * Optional mixed $old_url = NULL
13 Initial URL parts. Either an array, object, http\Url instance or string to parse.
14 * Optional mixed $new_url = NULL
15 Overriding URL parts. Either an array, object, http\Url instance or string to parse.
16 * Optional int $flags = 0
17 The modus operandi of constructing the url. See http\Url constants.
18
19 ## Throws:
20
21 * http\Exception\InvalidArgumentException
22 * http\Exception\BadUrlException
23
24 ## Changelog:
25
26 0. v3.0.0
27 * Changed the default of the $flags parameter from http\Url::FROM_ENV to 0.