<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] 新增 `App/Event/Event.php` 文件 ``` namespace App\Event; use EasySwoole\Component\Container; use EasySwoole\Component\Singleton; class Event extends Container{ use Singleton; function set($key, $item) { if (is_callable($item)){ return parent::set($key, $item); }else{ return false; } } function hook($event,...$arg){ $call = $this->get($event); if (is_callable($call)){ return call_user_func($call,...$arg); }else{ return null; } } } ``` 在框架的initialize事件中進行注冊事件: ``` \App\Event\Event::getInstance()->set('test', function ($arg,$arg1) { echo "test event:{$arg},{$arg1}\n"; }); \App\Event\Event::getInstance()->set('test2', function ($arg,$arg1) { echo "test event:{$arg},{$arg1}\n"; }); //別處調用 \App\Event\Event::getInstance()->hook('test','123','222'); //刪除 test2 的hook \App\Event\Event::getInstance()->delete('test2'); //清空所有 hook //\App\Event\Event::getInstance()->clear(); \App\Event\Event::getInstance()->hook('test2','abc','def'); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看