herosphp/event

event adapter herosphp Framework

v1.0.0 2022-09-19 00:14 UTC

This package is auto-updated.

Last update: 2024-08-22 05:24:57 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();