2021-03-15 02:54:16 +08:00
|
|
|
<?php
|
|
|
|
|
|
2022-03-15 18:05:33 +08:00
|
|
|
declare(strict_types=1);
|
2021-03-15 02:54:16 +08:00
|
|
|
|
|
|
|
|
namespace ZM\Annotation\Swoole;
|
|
|
|
|
|
2022-03-20 01:53:36 +08:00
|
|
|
use Attribute;
|
|
|
|
|
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
|
2021-03-15 02:54:16 +08:00
|
|
|
use Doctrine\Common\Annotations\Annotation\Target;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class OnTaskEvent
|
|
|
|
|
* @Annotation
|
2022-03-20 01:53:36 +08:00
|
|
|
* @NamedArgumentConstructor()
|
2021-03-15 02:54:16 +08:00
|
|
|
* @Target("METHOD")
|
|
|
|
|
*/
|
2022-03-20 01:53:36 +08:00
|
|
|
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD)]
|
2021-03-15 02:54:16 +08:00
|
|
|
class OnTaskEvent extends OnSwooleEventBase
|
|
|
|
|
{
|
2022-03-20 01:53:36 +08:00
|
|
|
public function __construct($rule = '', $level = 20)
|
|
|
|
|
{
|
|
|
|
|
$this->rule = $rule;
|
|
|
|
|
$this->level = $level;
|
|
|
|
|
}
|
2022-03-15 18:05:33 +08:00
|
|
|
}
|