JURI/parse
From Joomla! Documentation
< JURI
Parses the given URI into the internal object properties. Will return false if a parser error occurred.
Syntax
boolean parse( $uri )
where:
| Argument | Data type | Description | Default |
|---|---|---|---|
| $uri | string | URI to be represented by the JURI object. |
Example
In this example, a URI object is created and is then re-used for a new URI.
$uri = 'http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis'; $u =& JURI::getInstance( $uri ); echo 'URI is ' . $u->toString() . "\n"; $u->parse( 'https://www.example.com/joomla/index.php' ); echo 'URI is ' . $u->toString() . "\n";
would output
URI is http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis URI is https://www.example.com/joomla/index.php?task=view&id=32
Note that the query part is not cleared (as can be seen in this example).
