mdref.json config
[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_FRAGMENT
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 encoded 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 IDNA support).
39 * PARSE_TOIDN_2003
40 Explicitly request IDNA2003 implementation if available (libidn, idnkit or ICU).
41 * PARSE_TOIDN_2008
42 Explicitly request IDNA2008 implementation if available (libidn2, idnkit2 or ICU).
43 * PARSE_TOPCT
44 Percent encode multibyte sequences in the userinfo, path, query and fragment parts of the URL.
45 * IGNORE_ERRORS
46 Continue parsing when encountering errors.
47 * SILENT_ERRORS
48 Suppress errors/exceptions.
49 * STDFLAGS
50 Standard flags used by default internally for e.g. http\Message::setRequestUrl().
51 Enables joining path and query, sanitizing path, multibyte/unicode, international domain names and transient percent encoding.
52
53 ## Properties:
54
55 * public string $scheme = NULL
56 The URL's scheme.
57 * public string $user = NULL
58 Authenticating user.
59 * public string $pass = NULL
60 Authentication password.
61 * public string $host = NULL
62 Hostname/domain.
63 * public string $port = NULL
64 Port.
65 * public string $path = NULL
66 URL path.
67 * public string $query = NULL
68 URL querystring.
69 * public string $fragment = NULL
70 URL fragment (hash).