变更
This commit is contained in:
+10
-7
@@ -5,6 +5,7 @@ namespace Database\Annotation;
|
||||
|
||||
|
||||
use Attribute;
|
||||
use Database\Base\Getter;
|
||||
use Kiri\Annotation\AbstractAttribute;
|
||||
|
||||
|
||||
@@ -14,8 +15,8 @@ use Kiri\Annotation\AbstractAttribute;
|
||||
*/
|
||||
#[Attribute(Attribute::TARGET_METHOD)] class Get extends AbstractAttribute
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get constructor.
|
||||
* @param string $name
|
||||
@@ -23,17 +24,19 @@ use Kiri\Annotation\AbstractAttribute;
|
||||
public function __construct(public string $name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param mixed $class
|
||||
* @param mixed|null $method
|
||||
* @return bool
|
||||
*/
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$keys = \Kiri::getDi()->get(Getter::class);
|
||||
$keys->write($this->name, $class, $method);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user