JRouter
From Joomla! Documentation
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JRouter is an abstract class to create and parse routes. You need to write your own concrete router Class to make use of its functionality. The Joomla CMS uses the JRouterSite class as concrete router implementation. For further information see below.
JRouter, the Joomla CMS and writing your own SEO components[edit]
JRouter is an abstract class of the Joomla Framework. The Joomla CMS is a concrete application, using the Joomla Framework. Thus, they have created their own concrete Router class, which handles routes. This concrete Router is called JRouterSite and can be found in includes/router.php
.
If you take a look at the private _buildSefRoute method of this class, you'll quickly realise that the Joomla Developers allow you to create your own custom routing handlers for each of your components. This way you can make your components SEO friendly. If you want to learn how to write such an handler, take a look Supporting SEF URLs in your component and visit the section The Component Router
Defined in[edit]
libraries/joomla/joomla/application/router.php
Methods[edit]
Method name | Description | |
---|---|---|
__construct | Method to instantiate the router. |
Importing[edit]
jimport( 'joomla.application.router' );
This is a Test