Back to Joomla project (class list)

Class Route - list of methods

Route handling class
Package: Joomla\CMS\Router
Copyright: (C) 2012 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Router/Route.php
Project: Joomla

Method Summary

public static string
(mixed $url, mixed $xhtml = true, mixed $tls = self::TLS_IGNORE, mixed $absolute = false)

Translates an internal Joomla URL to a humanly readable URL. This method builds links for the current active client.
Parameters
  • string $url Absolute or Relative URI to Joomla resource.
  • bool $xhtml Replace & by & for XML compliance.
  • int $tls Secure state for the resolved URI. Use Route::TLS_* constants 0: (default) No change, use the protocol currently used in the request 1: Make URI secure using global secure site URI. 2: Make URI unsecure using the global unsecure site URI.
  • bool $absolute Return an absolute URL
Returns
  • string The translated humanly readable URL.
Since
  • 1.7.0
Show source code of this method: _ Source Code

public static string
(mixed $client, mixed $url, mixed $xhtml = true, mixed $tls = self::TLS_IGNORE, mixed $absolute = false)

Translates an internal Joomla URL to a humanly readable URL.
Parameters
  • string $client The client name for which to build the link.
  • string $url Absolute or Relative URI to Joomla resource.
  • bool $xhtml Replace & by & for XML compliance.
  • int $tls Secure state for the resolved URI. Use Route::TLS_* constants 0: (default) No change, use the protocol currently used in the request 1: Make URI secure using global secure site URI. 2: Make URI unsecure using the global unsecure site URI.
  • bool $absolute Return an absolute URL
Returns
  • string The translated humanly readable URL.
Since
  • 3.9.0
-
  • \RuntimeException
Show source code of this method: link Source Code

Properties Summary

private static \Joomla\CMS\Router\Router[]
$_router
The route object so we don't have to keep fetching it.
Since
  • 3.0.1

Constants Summary

public
$TLS_IGNORE
No change, use the protocol currently used.
Since
  • 3.9.7
public
$TLS_FORCE
Make URI secure using http over TLS (https).
Since
  • 3.9.7
public
$TLS_DISABLE
Make URI unsecure using plain http (http).
Since
  • 3.9.7

Tags Summary

Since
1.7.0