flush
[mdref/mdref-http] / http / Url.md
1 # class http\Url extends http\Object
2
3 The http\Url class provides versatile means to parse, construct and manipulate URLs.
4
5 ## Constants:
6
7 * REPLACE
8 Replace parts of the old URL with parts of the new.
9 * JOIN_PATH
10 Whether a relative path should be joined into the old path.
11 * JOIN_QUERY
12 Whether the querystrings should be joined.
13 * STRIP_USER
14 Strip the user information from the URL.
15 * STRIP_PASS
16 Strip the password from the URL.
17 * STRIP_AUTH
18 Strip user and password information from URL (same as STRIP_USER|STRIP_PASS).
19 * STRIP_PORT
20 Do not include the port.
21 * STRIP_PATH
22 Do not include the URL path.
23 * STRIP_QUERY
24 Do not include the URL querystring.
25 * STRIP_FRAMGENT
26 Strip the fragment (hash) from the URL.
27 * STRIP_ALL
28 Strip everything except scheme and host information.
29 * FROM_ENV
30 Import initial URL parts from the SAPI environment.
31 * SANITIZE_PATH
32 Whether to sanitize the URL path (consolidate double slashes, directory jumps etc.)
33
34
35 ## Properties:
36
37 * public $scheme = NULL
38 The URL's scheme.
39 * public $user = NULL
40 Authenticating user.
41 * public $pass = NULL
42 Authentication password.
43 * public $host = NULL
44 Hostname/domain.
45 * public $port = NULL
46 Port.
47 * public $path = NULL
48 URL path.
49 * public $query = NULL
50 URL querystring.
51 * public $fragment = NULL
52 URL fragment (hash).