Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.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.