Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-17 18:45:00 +08:00
parent fbe13eaa7e
commit d8222366b1
13 changed files with 501 additions and 5 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Kiri\Task\Annotation;
use Kiri\Annotation\Attribute;
use Kiri\Task\TaskManager;
#[\Attribute(\Attribute::TARGET_CLASS)] class AsynchronousTask extends Attribute
{
/**
* @param string $name
*/
public function __construct(public string $name)
{
}
/**
* @param mixed $class
* @param mixed $method
* @return mixed
*/
public function execute(mixed $class, mixed $method = ''): mixed
{
$AsyncTaskExecute = \Kiri::getDi()->get(TaskManager::class);
$AsyncTaskExecute->add($this->name, $class::class);
return parent::execute($class, $method); // TODO: Change the autogenerated stub
}
}