Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
Misc Class Reference

Miscellaneous utilities. More...

Static Public Member Functions

static absolutize_url ($relative, $base)
 
static debug (&$sp)
 Format debugging information.
 
static get_build ()
 Get the SimplePie build timestamp.
 
static get_default_useragent ()
 Get the default user agent string.
 
static get_element ($realname, $string)
 Get a HTML/XML element from a HTML string.
 
static silence_errors ($num, $str)
 
static time_hms ($seconds)
 
static url_remove_credentials ($url)
 Sanitize a URL by removing HTTP credentials.
 

Detailed Description

Miscellaneous utilities.

Member Function Documentation

◆ get_build()

static Misc::get_build ( )
static

Get the SimplePie build timestamp.

Uses the git index if it exists, otherwise uses the modification time of the newest file.

◆ get_default_useragent()

static Misc::get_default_useragent ( )
static

Get the default user agent string.

Return values
string

◆ get_element()

static Misc::get_element ( $realname,
$string )
static

Get a HTML/XML element from a HTML string.

Deprecated
since SimplePie 1.3, use DOMDocument instead (parsing HTML with regex is bad!)
Parameters
string$realnameElement name (including namespace prefix if applicable)
string$stringHTML document
Return values
array

◆ url_remove_credentials()

static Misc::url_remove_credentials ( $url)
static

Sanitize a URL by removing HTTP credentials.

Parameters
string$urlthe URL to sanitize.
Return values
stringthe same URL without HTTP credentials.

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