Why in the class JRoute there is no method with _ , but we use it??, the class JRoute only extends the JObjects, but where are the _ function? in joomla
What version are you using? If you go to the API page , you have this source code:
class JRoute
{
/**
* Translates an internal Joomla URL to a humanly readible URL.
*
* @param string $url Absolute or Relative URI to Joomla resource.
* @param boolean $xhtml Replace & by & for XML compilance.
* @param integer $ssl Secure state for the resolved URI.
* 1: Make URI secure using global secure site URI.
* 0: Leave URI in the same secure state as it was passed to the function.
* -1: Make URI unsecure using the global unsecure site URI.
*
* @return The translated humanly readible URL.
*
* @since 11.1
*/
public static function _($url, $xhtml = true, $ssl = null)
{
// Get the router.
$app = JFactory::getApplication();
$router = $app->getRouter();
// Make sure that we have our router
if (!$router)
{
So the method is there, defined right from the beginning (line 33 more or less).
Look here for the method's documentation : http://api.joomla.org/Joomla-Platform/JRoute.html#method_
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.