| @@ -1,0 +1,100 @@ | ||
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * @package VikBooking | |
| 4 | + * @subpackage core | |
| 5 | + * @author E4J s.r.l. | |
| 6 | + * @copyright Copyright (C) 2018 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 | +// include defines | |
| 15 | +require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'defines.php'; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * @since 1.0.2 It is possible to inject debug=on in query | |
| 19 | + * string to force the error reporting to MAXIMUM. | |
| 20 | + */ | |
| 21 | +if (VIKBOOKING_DEBUG || (isset($_GET['debug']) && $_GET['debug'] == 'on')) | |
| 22 | +{ | |
| 23 | + error_reporting(E_ALL); | |
| 24 | + ini_set('display_errors', true); | |
| 25 | +} | |
| 26 | + | |
| 27 | +// include internal loader if not exists | |
| 28 | +if (!class_exists('JLoader')) | |
| 29 | +{ | |
| 30 | + require_once implode(DIRECTORY_SEPARATOR, [dirname(__FILE__), 'libraries', 'adapter', 'loader', 'loader.php']); | |
| 31 | + | |
| 32 | + // setup auto-loader | |
| 33 | + JLoader::setup(); | |
| 34 | + | |
| 35 | + // setup base path | |
| 36 | + JLoader::$base = VIKBOOKING_LIBRARIES; | |
| 37 | +} | |
| 38 | + | |
| 39 | +// load framework dependencies | |
| 40 | +JLoader::import('adapter.acl.access'); | |
| 41 | +JLoader::import('adapter.loader.utils'); | |
| 42 | +JLoader::import('adapter.mvc.view'); | |
| 43 | +JLoader::import('adapter.mvc.controller'); | |
| 44 | +JLoader::import('adapter.factory.factory'); | |
| 45 | +JLoader::import('adapter.html.html'); | |
| 46 | +JLoader::import('adapter.http.http'); | |
| 47 | +JLoader::import('adapter.input.input'); | |
| 48 | +JLoader::import('adapter.output.filter'); | |
| 49 | +JLoader::import('adapter.language.text'); | |
| 50 | +JLoader::import('adapter.layout.helper'); | |
| 51 | +JLoader::import('adapter.session.handler'); | |
| 52 | +JLoader::import('adapter.session.session'); | |
| 53 | +JLoader::import('adapter.application.route'); | |
| 54 | +JLoader::import('adapter.application.version'); | |
| 55 | +JLoader::import('adapter.uri.uri'); | |
| 56 | +JLoader::import('adapter.toolbar.helper'); | |
| 57 | +JLoader::import('adapter.editor.editor'); | |
| 58 | +JLoader::import('adapter.date.date'); | |
| 59 | +JLoader::import('adapter.event.dispatcher'); | |
| 60 | +JLoader::import('adapter.event.pluginhelper'); | |
| 61 | +JLoader::import('adapter.component.helper'); | |
| 62 | +JLoader::import('adapter.database.table'); | |
| 63 | + | |
| 64 | +// import internal loader | |
| 65 | +JLoader::import('loader.loader', VIKBOOKING_LIBRARIES); | |
| 66 | + | |
| 67 | +// load plugin dependencies | |
| 68 | +VikBookingLoader::import('bc.error'); | |
| 69 | +VikBookingLoader::import('bc.mvc'); | |
| 70 | +VikBookingLoader::import('layout.helper'); | |
| 71 | +VikBookingLoader::import('lite.manager'); | |
| 72 | +VikBookingLoader::import('lite.vcm.manager'); | |
| 73 | +VikBookingLoader::import('system.body'); | |
| 74 | +VikBookingLoader::import('system.builder'); | |
| 75 | +VikBookingLoader::import('system.cron'); | |
| 76 | +VikBookingLoader::import('system.install'); | |
| 77 | +VikBookingLoader::import('system.screen'); | |
| 78 | +VikBookingLoader::import('system.feedback'); | |
| 79 | +VikBookingLoader::import('system.rssfeeds'); | |
| 80 | +VikBookingLoader::import('system.assets'); | |
| 81 | +/** | |
| 82 | + * @since 1.4.1 class VikRequest is no longer an adapter. | |
| 83 | + */ | |
| 84 | +VikBookingLoader::import('system.request'); | |
| 85 | +// | |
| 86 | +VikBookingLoader::import('wordpress.application'); | |
| 87 | + | |
| 88 | +/** | |
| 89 | + * @since 1.2.0 include class JViewVikBooking that extends JViewBaseVikBooking | |
| 90 | + * to provide methods for any view instances. | |
| 91 | + */ | |
| 92 | +VikBookingLoader::registerAlias('view.vbo', 'viewvbo'); | |
| 93 | +VikBookingLoader::import('helpers.viewvbo', VBO_SITE_PATH); | |
| 94 | + | |
| 95 | +/** | |
| 96 | + * Added support to the plugin libraries autoloader. | |
| 97 | + * | |
| 98 | + * @since 1.5 | |
| 99 | + */ | |
| 100 | +VikBookingLoader::import('helpers.src.autoload', VBO_ADMIN_PATH); | |