flush docs
[mdref/mdref-http] / http / Url.md
1 # class http\Url
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 * PARSE_MBUTF8
34 Parse UTF-8 encododed multibyte sequences.
35 * PARSE_MBLOC
36 Parse locale encoded multibyte sequences (on systems with wide character support).
37 * PARSE_TOIDN
38 Parse and convert multibyte hostnames according to IDNA (with libidn support).
39 * PARSE_TOPCT
40 Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL.
41
42 ## Properties:
43
44 * public string $scheme = NULL
45 The URL's scheme.
46 * public string $user = NULL
47 Authenticating user.
48 * public string $pass = NULL
49 Authentication password.
50 * public string $host = NULL
51 Hostname/domain.
52 * public string $port = NULL
53 Port.
54 * public string $path = NULL
55 URL path.
56 * public string $query = NULL
57 URL querystring.
58 * public string $fragment = NULL
59 URL fragment (hash).