-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefines.php
More file actions
62 lines (55 loc) · 1.27 KB
/
defines.php
File metadata and controls
62 lines (55 loc) · 1.27 KB
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
/**
* @package Configurator Component
* @author Prothemer http://www.prothemer.com
* @copyright Copyright (C) 2008 - 2010 Web Monkeys Design Studio CC.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @desc Originally based on Tatami from Ninja Forge. http://www.ninjaforge.com
*/
defined('_JEXEC') or die('Restricted access');
/**
* ComConfiguratorDefines
*
* Information like the manifest path and such are stored here
*
* @author Stian Didriksen <stian@prothemer.com>
*/
class ComConfiguratorDefines extends JObject
{
/**
* Configurator version
*
* @var version string
*/
protected static $_version;
/**
* Path to configurator manifest
*
* @var dir
*/
protected static $_manifest_path;
/**
* Gets the Configurator version
*
* @return dir
*/
public static function getVersion()
{
if(!isset(self::$_version)) {
self::$_version = (string) simplexml_load_file(self::getManifestPath())->version;
}
return self::$_version;
}
/**
* Gets the path to the xml manifest
*
* @return dir
*/
public static function getManifestPath()
{
if(!isset(self::$_manifest_path)) {
self::$_manifest_path = JPATH_ADMINISTRATOR . '/components/com_configurator/configurator.xml';
}
return self::$_manifest_path;
}
}