1 <?php
2 /**
3 * @package Joomla.Libraries
4 * @subpackage Component
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 * JComponentRouterRules interface for Joomla
14 *
15 * @since 3.4
16 */
17 interface JComponentRouterRulesInterface
18 {
19 /**
20 * Prepares a query set to be handed over to the build() method.
21 * This should complete a partial query set to work as a complete non-SEFed
22 * URL and in general make sure that all information is present and properly
23 * formatted. For example, the Itemid should be retrieved and set here.
24 *
25 * @param array &$query The query array to process
26 *
27 * @return void
28 *
29 * @since 3.4
30 */
31 public function preprocess(&$query);
32
33 /**
34 * Parses a URI to retrieve informations for the right route through
35 * the component.
36 * This method should retrieve all its input from its method arguments.
37 *
38 * @param array &$segments The URL segments to parse
39 * @param array &$vars The vars that result from the segments
40 *
41 * @return void
42 *
43 * @since 3.4
44 */
45 public function parse(&$segments, &$vars);
46
47 /**
48 * Builds URI segments from a query to encode the necessary informations
49 * for a route in a human-readable URL.
50 * This method should retrieve all its input from its method arguments.
51 *
52 * @param array &$query The vars that should be converted
53 * @param array &$segments The URL segments to create
54 *
55 * @return void
56 *
57 * @since 3.4
58 */
59 public function build(&$query, &$segments);
60 }
61