-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoload.php
More file actions
executable file
·28 lines (25 loc) · 975 Bytes
/
autoload.php
File metadata and controls
executable file
·28 lines (25 loc) · 975 Bytes
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
<?php
/*******************************************************************************
* Copyright (c) 2022. Ankio. All Rights Reserved.
******************************************************************************/
/**
* File autoload.php
* Created By ankio.
* Date : 2023/5/3
* Time : 18:10
* Description :
*/
use cleanphp\base\EventManager;
use cleanphp\base\Variables;
use cleanphp\engine\EngineManager;
use cleanphp\engine\JsonEngine;
use library\login\LoginManager;
EventManager::addListener("__application_init__", function (string $event, &$data) {
$__module = Variables::get("__request_module__");
$__controller = Variables::get("__request_controller__");
$__action = Variables::get("__request_action__");
if ($__module === 'ankio' && $__controller === 'login') {
EngineManager::setDefaultEngine(new JsonEngine(["code" => 0, "msg" => "OK", "data" => null, "count" => 0]));
LoginManager::init()->route($__action);
}
});