herosphp / event
event adapter herosphp Framework
v1.0.0
2022-09-19 00:14 UTC
Requires
- php: ^8.1
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-22 06:21:23 UTC
README
增加事件机制,主要是为了进行代码解耦。
install
composer install herosphp/event
publish config file
composer vendor:publish "herosphp/event"
init class
<?php
declare(strict_types=1);
namespace app\init;
use herosphp\core\Config;
use herosphp\utils\Logger;
use herosphp\plugin\event\EventStarter as BaseEventStarter
class EventStarter extends BaseEventStarter
{
protected static bool $debug = false;
}
EventStarter::init();