| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Environment |
JURI |
setScheme |
setScheme() |
Never | Work in Progress |
Sets the URI scheme (protocol). This function sets the URI scheme (ie. http, https, ftp, etc.).
void setScheme ( $scheme )
| $scheme | string | is a string containing the new URI scheme. |
Example
$uri = new JURI( 'http://forum.joomla.org/index.php/topic,41464.msg227819.html#msg227819' ); echo "Before: " . $uri->toString(); $uri->setScheme( 'https' ); echo "After: " . $uri->toString();
might produce:
Result
Before: http://forum.joomla.org/index.php/topic,41464.msg227819.html#msg227819 After: https://forum.joomla.org/index.php/topic,41464.msg227819.html#msg227819