Skip to content

Commit b3a71f2

Browse files
committed
[FIX] Refactor MODX_CLASS to EVO_CLASS.
1 parent 922fc6c commit b3a71f2

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

core/custom/define.php.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* - SESSION_COOKIE_PATH
77
* - SESSION_COOKIE_DOMAIN
88
* - SESSION_COOKIE_NAME
9-
* - MODX_CLASS
9+
* - EVO_CLASS
1010
* - EVO_CORE_PATH
1111
* - MODX_SITE_HOSTNAMES
1212
* - MGR_DIR

core/functions/preload.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
*/
77
function evo()
88
{
9-
if (!defined('MODX_CLASS')) {
9+
if (!defined('EVO_CLASS')) {
1010
if (!class_exists('\DocumentParser')) {
11-
throw new RuntimeException('MODX_CLASS not defined and EvolutionCMS\Core class not exists');
11+
throw new RuntimeException('EVO_CLASS not defined and EvolutionCMS\Core class not exists');
1212
}
13-
define('MODX_CLASS', '\DocumentParser');
13+
define('EVO_CLASS', '\DocumentParser');
1414
}
1515

1616
global $modx;
1717
if ($modx === null) {
1818
try {
19-
$obj = new ReflectionClass(MODX_CLASS);
19+
$obj = new ReflectionClass(EVO_CLASS);
2020
$modx = $obj->newInstanceWithoutConstructor()->getInstance();
2121
} catch (ReflectionException $exception) {
2222
echo $exception->getMessage();

core/includes/define.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333

3434
/**
35-
* @deprecated use EVO_CLASS
35+
* @deprecated since EVO 3.2.6, use EVO_CLASS
36+
* @TODO: will be delete EVO 3.5
3637
*/
3738
if (!defined('MODX_CLASS')) {
3839
define('MODX_CLASS', env('MODX_CLASS', '\DocumentParser'));

0 commit comments

Comments
 (0)