PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / site / helpers / libraries / sef / factory.php
vikappointments / site / helpers / libraries / sef Last commit date
router 2 days ago factory.php 2 days ago helper.php 2 days ago index.html 2 days ago router.php 2 days ago
factory.php
43 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * Factory class used to load the correct router handler
16 * according to the platform version.
17 *
18 * @since 1.7
19 */
20 final class VAPSefFactory
21 {
22 /**
23 * Loads the router instance.
24 * It is not needed to return or instantiate the class,
25 * since it is enough to let Joomla accesses it.
26 *
27 * @return void
28 */
29 public static function loadRouter()
30 {
31 if (VersionListener::isJoomla4x())
32 {
33 // load router compatible with Joomla 4 or higher
34 VAPLoader::import('libraries.sef.router.j40');
35 }
36 else
37 {
38 // load default router
39 VAPLoader::import('libraries.sef.router.default');
40 }
41 }
42 }
43