Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Contains the url class, providing a representation of a url and operations on its component parts.

Copyright: 2020 Jake Dallimore <jrhdallimore@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 84 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

url:: (4 methods):
  __construct()
  get_path()
  get_host()
  get_value()


Class: url  - X-Ref

The url class, providing a representation of a url and operations on its component parts.

__construct(string $url)   X-Ref
The url constructor.

param: string $url the URL string.

get_path()   X-Ref
Get the path component of the URL.

return: string|null the path component of the URL.

get_host()   X-Ref
Return the domain component of the URL.

return: string|null the domain component of the URL.

get_value()   X-Ref
Return the full URL string.

return: string the full URL string.