url error control
[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 * IGNORE_ERRORS
42 Continue parsing when encountering errors.
43 * SILENT_ERRORS
44 Suppress errors/exceptions.
45 * STDFLAGS
46 Standard flags used by default internally for e.g. http\Message::setRequestUrl().
47 Enables joining path and query, sanitizing path, multibyte/unicode, international domain names and transient percent encoding.
48
49 ## Properties:
50
51 * public string $scheme = NULL
52 The URL's scheme.
53 * public string $user = NULL
54 Authenticating user.
55 * public string $pass = NULL
56 Authentication password.
57 * public string $host = NULL
58 Hostname/domain.
59 * public string $port = NULL
60 Port.
61 * public string $path = NULL
62 URL path.
63 * public string $query = NULL
64 URL querystring.
65 * public string $fragment = NULL
66 URL fragment (hash).