add @OnStart Annotation

This commit is contained in:
whale
2020-03-12 19:06:27 +08:00
parent 21059a7ed7
commit 8d8707a92f
4 changed files with 39 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ use ZM\Annotation\Interfaces\Level;
use ZM\Annotation\Module\Closed;
use ZM\Annotation\Module\InitBuffer;
use ZM\Annotation\Module\SaveBuffer;
use ZM\Annotation\Swoole\OnStart;
use ZM\Annotation\Swoole\SwooleEventAfter;
use ZM\Annotation\Swoole\SwooleEventAt;
use ZM\Annotation\Interfaces\Rule;
@@ -73,6 +74,9 @@ class AnnotationParser
elseif ($vss instanceof CustomAnnotation) ZMBuf::$events[get_class($vss)][] = $vss;
elseif ($vss instanceof CQBefore) ZMBuf::$events[CQBefore::class][$vss->cq_event][] = $vss;
elseif ($vss instanceof CQAfter) ZMBuf::$events[CQAfter::class][$vss->cq_event][] = $vss;
elseif ($vss instanceof OnStart) {
ZMBuf::$events[OnStart::class][]=$vss;
}
}
}
}