Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_moodlenet\local\url Class Reference

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

Public Member Functions

 __construct (string $url)
 The url constructor.
 
 get_host ()
 Return the domain component of the URL.
 
 get_path ()
 Get the path component of the URL.
 
 get_value ()
 Return the full URL string.
 

Protected Attributes

host null $host
 $host the host component of this URL.
 
string null $path
 $path the path component of this URL.
 
string $url
 $url the full URL string.
 

Detailed Description

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

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_moodlenet\local\url::__construct ( string $url)

The url constructor.

Parameters
string$urlthe URL string.
Exceptions
coding_exceptionif the URL does not pass syntax validation.

Member Function Documentation

◆ get_host()

tool_moodlenet\local\url::get_host ( )

Return the domain component of the URL.

Return values
string|nullthe domain component of the URL.

◆ get_path()

tool_moodlenet\local\url::get_path ( )

Get the path component of the URL.

Return values
string|nullthe path component of the URL.

◆ get_value()

tool_moodlenet\local\url::get_value ( )

Return the full URL string.

Return values
stringthe full URL string.

The documentation for this class was generated from the following file: