Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-17 14:04:37 +08:00
parent 466df3387f
commit fbe13eaa7e
-44
View File
@@ -1,44 +0,0 @@
<?php
namespace Kiri\Annotation;
use Exception;
use Kiri;
use Kiri\Server\Tasker\AsyncTaskExecute;
/**
* Class Task
* @package Annotation
* Task任务
*/
#[\Attribute(\Attribute::TARGET_CLASS)] class Task extends Attribute
{
/**
* Task constructor.
* @param string $name
*/
public function __construct(public string $name)
{
}
/**
* @param mixed $class
* @param mixed|null $method
* @return bool
* @throws Exception
*/
public function execute(mixed $class, mixed $method = null): bool
{
$task = Kiri::getDi()->get(AsyncTaskExecute::class);
$task->reg($this->name, $class);
return true;
}
}