mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
add level for Init
This commit is contained in:
parent
316c29628a
commit
dbbc6f75d8
@ -8,6 +8,7 @@ use Attribute;
|
||||
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
|
||||
use Doctrine\Common\Annotations\Annotation\Target;
|
||||
use ZM\Annotation\AnnotationBase;
|
||||
use ZM\Annotation\Interfaces\Level;
|
||||
|
||||
/**
|
||||
* Class Init
|
||||
@ -17,9 +18,19 @@ use ZM\Annotation\AnnotationBase;
|
||||
* @since 3.0.0
|
||||
*/
|
||||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD)]
|
||||
class Init extends AnnotationBase
|
||||
class Init extends AnnotationBase implements Level
|
||||
{
|
||||
public function __construct(public int $worker = 0)
|
||||
public function __construct(public int $worker = 0, public int $level = 20)
|
||||
{
|
||||
}
|
||||
|
||||
public function getLevel()
|
||||
{
|
||||
return $this->level;
|
||||
}
|
||||
|
||||
public function setLevel($level)
|
||||
{
|
||||
$this->level = $level;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user