1 <?php
2 /**
3 * @package Joomla.Libraries
4 * @subpackage Router
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Class to create and parse routes
14 *
15 * @since 1.5
16 */
17 class JRouterAdministrator extends JRouter
18 {
19 /**
20 * Function to convert a route to an internal URI.
21 *
22 * @param JUri &$uri The uri.
23 *
24 * @return array
25 *
26 * @since 1.5
27 */
28 public function parse(&$uri)
29 {
30 return array();
31 }
32
33 /**
34 * Function to convert an internal URI to a route
35 *
36 * @param string $url The internal URL
37 *
38 * @return string The absolute search engine friendly URL
39 *
40 * @since 1.5
41 */
42 public function build($url)
43 {
44 // Create the URI object
45 $uri = parent::build($url);
46
47 // Get the path data
48 $route = $uri->getPath();
49
50 // Add basepath to the uri
51 $uri->setPath(JUri::base(true) . '/' . $route);
52
53 return $uri;
54 }
55 }
56