Detailed Description
Definition at line 25 of file url.php.
Member Function Documentation
Extracts the X, Y coordinate pair from an image map.
- Parameters:
-
| string | $url | URL so far. The coordinates will be removed. |
- Returns:
- array X, Y as a pair of integers. private
Definition at line 68 of file url.php.
Extracts the host part of an incoming URL. Includes the port number part. Will extract the host if it starts with // or it has a top level domain or it has at least two dots.
- Parameters:
-
| string | $url | URL so far. The host will be removed. |
- Returns:
- string Host part guess or false. private
Definition at line 129 of file url.php.
Extracts the username and password from the incoming URL. The // prefix will be reattached to the URL after the doublet is extracted.
- Parameters:
-
| string | $url | URL so far. The username and password are removed. |
- Returns:
- array Two item list of username and password. Will urldecode() them. private
Definition at line 101 of file url.php.
Extracts the path information from the incoming URL. Strips this path from the URL.
- Parameters:
-
| string | $url | URL so far. The host will be removed. |
- Returns:
- string Path part or '/'. private
Definition at line 155 of file url.php.
Strips off the request data.
- Parameters:
-
| string | $url | URL so far. The request will be removed. |
- Returns:
- string Raw request part. private
Definition at line 170 of file url.php.
Extracts the scheme part of an incoming URL.
- Parameters:
-
| string | $url | URL so far. The scheme will be removed. |
- Returns:
- string Scheme part or false. private
Definition at line 83 of file url.php.
Replaces unknown sections of the path with base parts to return a complete absolute one.
- Parameters:
-
| string/SimpleUrl | $base Base URL. |
| string | Absolute path. private |
Definition at line 470 of file url.php.
Simple test to see if a path part is relative.
- Parameters:
-
- Returns:
- boolean True if starts with a "/". private
Definition at line 489 of file url.php.
Breaks the request down into an object.
- Parameters:
-
- Returns:
- SimpleFormEncoding Parsed data. private
Definition at line 184 of file url.php.
Adds an additional parameter to the request.
- Parameters:
-
| string | $key | Name of parameter. |
| string | $value | Value as string. public |
Definition at line 360 of file url.php.
Adds additional parameters to the request.
- Parameters:
-
| hash/SimpleFormEncoding | $parameters Additional parameters. public |
Definition at line 371 of file url.php.
Renders the URL back into a string.
- Returns:
- string URL in canonical form. public
Definition at line 411 of file url.php.
Clears down all parameters. public
Definition at line 380 of file url.php.
A pipe seperated list of all TLDs that result in two part domain names.
- Returns:
- string Pipe separated list. public
Definition at line 524 of file url.php.
Gets the path to the page.
- Returns:
- string Path less the page. public
Definition at line 284 of file url.php.
Accessor for current request parameters in URL string form. Will return teh original request if at all possible even if it doesn't make much sense.
- Returns:
- string Form is string "?a=1&b=2", etc. public
Definition at line 342 of file url.php.
Accessor for fragment at end of URL after the "#".
- Returns:
- string Part after "#". public
Definition at line 296 of file url.php.
Accessor for hostname and port.
- Parameters:
-
| string | $default | Value to use if not present. |
- Returns:
- string Hostname only. public
Definition at line 231 of file url.php.
Extracts the username and password for use in rendering a URL.
- Returns:
- string/boolean Form of username:password or false. public
Definition at line 499 of file url.php.
Accessor for page if any. This may be a directory name if ambiguious.
- Returns:
- Page name. public
Definition at line 272 of file url.php.
Accessor for password.
- Returns:
- string Password preceding host. public
Definition at line 221 of file url.php.
Accessor for path.
- Returns:
- string Full path including leading slash if implied. public
Definition at line 259 of file url.php.
Accessor for port number.
- Returns:
- integer TCP/IP port number. public
Definition at line 250 of file url.php.
Accessor for protocol part.
- Parameters:
-
| string | $default | Value to use if not present. |
- Returns:
- string Scheme name, e.g "http". public
Definition at line 203 of file url.php.
Gets the frame target if present. Although not strictly part of the URL specification it acts as similarily to the browser.
- Returns:
- boolean/string Frame name or false if none. public
Definition at line 392 of file url.php.
Accessor for top level domain.
- Returns:
- string Last part of host. public
Definition at line 240 of file url.php.
Accessor for user name.
- Returns:
- string Username preceding host. public
Definition at line 212 of file url.php.
Accessor for horizontal image coordinate.
- Returns:
- integer X value. public
Definition at line 321 of file url.php.
Accessor for vertical image coordinate.
- Returns:
- integer Y value. public
Definition at line 330 of file url.php.
Replaces unknown sections to turn a relative URL into an absolute one. The base URL can be either a string or a SimpleUrl object.
- Parameters:
-
| string/SimpleUrl | $base Base URL. public |
Definition at line 438 of file url.php.
Replaces . and .. sections of the path.
- Parameters:
-
| string | $path | Unoptimised path. |
- Returns:
- string Path with dots removed if possible. public
Definition at line 512 of file url.php.
Sets image coordinates. Set to false to clear them.
- Parameters:
-
| integer | $x | Horizontal position. |
| integer | $y | Vertical position. public |
Definition at line 307 of file url.php.
Attaches a frame target.
- Parameters:
-
| string | $frame | Name of frame. public |
Definition at line 401 of file url.php.
Constructor. Parses URL into sections.
- Parameters:
-
| string | $url | Incoming URL. public |
Definition at line 44 of file url.php.
Field Documentation
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/lib/simpletestlib/url.php