-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbootstrap.php
62 lines (55 loc) · 2.08 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* @version $Id:
* @package Matware
* @subpackage ExampleWebSocket
* @copyright Copyright (C) 1996 - 2014 Matware - All rights reserved.
* @author Matias Aguirre
* @email [email protected]
* @link http://www.matware.com.ar/
* @license GNU/GPL http://www.gnu.org/licenses/gpl-2.0-standalone.html
*/
// Setup the base path related constant.
$ROOT = dirname(dirname(__FILE__)).'/joomla-cms.my';
// Ensure that required path constants are defined.
if (!defined('JPATH_LIBRARIES'))
{
define('JPATH_LIBRARIES', $ROOT.'/libraries');
}
// Fire up the Platform importer.
if (file_exists(JPATH_LIBRARIES . '/import.php'))
{
require JPATH_LIBRARIES . '/import.php';
}
// Import the Joomla! CMS
if (file_exists(JPATH_LIBRARIES.'/cms.php')) {
require_once JPATH_LIBRARIES.'/cms.php';
}
// Ensure that required path constants are defined.
if (!defined('JPATH_SITE'))
{
define('JPATH_SITE', $ROOT);
}
// Define cache path
if (!defined('JPATH_CACHE'))
{
define('JPATH_CACHE', $ROOT.'/cache');
}
// Import the database libraries
jimport('joomla.database.database');
// Import the file libraries
jimport('joomla.filesystem.file');
// Import the html libraries
jimport('cms.html.html');
// Import the MWebSocket class from Matware libraries.
JLoader::register('MSocketDaemon', JPATH_LIBRARIES.'/matware/socket/daemon.php');
JLoader::register('MWebsocket', JPATH_LIBRARIES.'/matware/socket/websocket.php');
JLoader::register('MWebsocketUser', JPATH_LIBRARIES.'/matware/socket/websocket/user.php');
// Interfaces.
JLoader::register('MWebsocketController', JPATH_LIBRARIES.'/matware/socket/websocket/controller.php');
JLoader::register('MWebsocketHandshake', JPATH_LIBRARIES.'/matware/socket/websocket/handshake.php');
JLoader::register('MWebsocketProtocol', JPATH_LIBRARIES.'/matware/socket/websocket/protocol.php');
// Adapters.
JLoader::discover('MWebsocketHandshake', JPATH_LIBRARIES.'/matware/socket/websocket/handshakes');
JLoader::discover('MWebsocketProtocol', JPATH_LIBRARIES.'/matware/socket/websocket/protocols');
require __DIR__ . '/configuration.php';