2021-02-28 17:34:55 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Annotation;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Target
|
|
|
|
|
* @package Annotation
|
|
|
|
|
*/
|
2021-03-03 18:35:04 +08:00
|
|
|
#[\Attribute(\Attribute::TARGET_CLASS)] class Target extends Attribute
|
2021-02-28 17:34:55 +08:00
|
|
|
{
|
|
|
|
|
|
2021-08-20 14:34:10 +08:00
|
|
|
|
|
|
|
|
const WORKER = 'worker';
|
|
|
|
|
const ALL = 'any';
|
|
|
|
|
const PROCESS = 'process';
|
|
|
|
|
const TASK = 'task';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $only
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(public string $only = Target::ALL)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-28 17:34:55 +08:00
|
|
|
}
|