改名
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
namespace Database;
|
||||
|
||||
|
||||
use Annotation\IAnnotation;
|
||||
use Exception;
|
||||
use Snowflake\Abstracts\Providers;
|
||||
use Snowflake\Application;
|
||||
@@ -31,6 +32,12 @@ class DatabasesProviders extends Providers
|
||||
$event = Snowflake::app()->getEvent();
|
||||
$event->on(Event::SERVER_WORKER_START, [$this, 'createPool']);
|
||||
$event->on(Event::SERVER_TASK_START, [$this, 'createPool']);
|
||||
|
||||
$event = Snowflake::app()->getEvent();
|
||||
$event->on(Event::SERVER_WORKER_START, function () {
|
||||
$attributes = Snowflake::app()->getAttributes();
|
||||
$attributes->readControllers(CONTROLLER_PATH, 'App\Models', 'models');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ defined('DB_ERROR_BUSY') or define('DB_ERROR', 'The database is busy. Please try
|
||||
defined('SELECT_IS_NULL') or define('SELECT_IS_NULL', 'Query data does not exist, please check the relevant conditions.');
|
||||
defined('PARAMS_IS_NULL') or define('PARAMS_IS_NULL', 'Required items cannot be empty, please add.');
|
||||
defined('CONTROLLER_PATH') or define('CONTROLLER_PATH', APP_PATH . 'app/Http/Controllers/');
|
||||
defined('MODEL_PATH') or define('MODEL_PATH', APP_PATH . 'app/Models/');
|
||||
defined('SOCKET_PATH') or define('SOCKET_PATH', APP_PATH . 'app/Websocket/');
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user