-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathframework_info.php
96 lines (83 loc) · 2.29 KB
/
framework_info.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
/**
* kitFramework
*
* @author Team phpManufaktur <[email protected]>
* @link https://kit2.phpmanufaktur.de
* @copyright 2014 Ralf Hertsch <[email protected]>
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT
*/
use phpManufaktur\Basic\Control\CMS\kitFrameworkInfo;
$class_path = WB_PATH.'/kit2/extension/phpmanufaktur/phpManufaktur/Basic/Control/CMS/kitFrameworkInfo.php';
if (file_exists($class_path)) {
require_once $class_path;
if (!class_exists('kitFrameworkInfo')) {
/**
* Check if the kitFramework is installed
*
* @return boolean
*/
function kitFramework_isInstalled()
{
return true;
}
/**
* Check if the given kitCommand exists
*
* @param string $command
* @return boolean
*/
function kitFramework_isCommandAvailable($command)
{
$kitFrameworkInfo = new kitFrameworkInfo();
return $kitFrameworkInfo->isCommandAvailable($command);
}
/**
* Check if the given kitFilter exists
*
* @param string $filter
* @return boolean
*/
function kitFramework_isFilterAvailable($filter)
{
$kitFrameworkInfo = new kitFrameworkInfo();
return $kitFrameworkInfo->isFilterAvailable($filter);
}
}
}
else {
// if the kitFramework is not installed the functions must also return a response!
if (!function_exists('kitFramework_isInstalled')) {
/**
* Check if the kitFramework is installed
*
* @return boolean
*/
function kitFramework_isInstalled()
{
return false;
}
}
if (!function_exists('kitFramework_isCommandAvailable')) {
/**
* Check if the given kitCommand exists
*
* @return boolean
*/
function kitFramework_isCommandAvailable()
{
return false;
}
}
if (!function_exists('kitFramework_isFilterAvailable')) {
/**
* Check if the given kitFilter exists
*
* @return boolean
*/
function kitFramework_isFilterAvailable()
{
return false;
}
}
}