2022-01-09 03:49:51 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Database\Annotation;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use Attribute;
|
2023-03-30 20:39:00 +08:00
|
|
|
use Database\Base\Getter;
|
2022-06-22 18:28:46 +08:00
|
|
|
use Kiri\Annotation\AbstractAttribute;
|
2022-01-09 03:49:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Get
|
|
|
|
|
* @package Annotation\Model
|
2023-04-10 11:36:33 +08:00
|
|
|
* @deprecated
|
2022-01-09 03:49:51 +08:00
|
|
|
*/
|
2022-06-22 18:28:46 +08:00
|
|
|
#[Attribute(Attribute::TARGET_METHOD)] class Get extends AbstractAttribute
|
2022-01-09 03:49:51 +08:00
|
|
|
{
|
2023-03-30 20:39:00 +08:00
|
|
|
|
|
|
|
|
|
2022-01-09 03:49:51 +08:00
|
|
|
/**
|
|
|
|
|
* Get constructor.
|
|
|
|
|
* @param string $name
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(public string $name)
|
|
|
|
|
{
|
|
|
|
|
}
|
2023-03-30 20:39:00 +08:00
|
|
|
|
|
|
|
|
|
2022-02-21 10:56:37 +08:00
|
|
|
/**
|
|
|
|
|
* @param mixed $class
|
|
|
|
|
* @param mixed|null $method
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
2023-03-30 20:39:00 +08:00
|
|
|
public function execute(mixed $class, mixed $method = null): bool
|
2022-01-09 03:49:51 +08:00
|
|
|
{
|
2023-04-10 11:36:33 +08:00
|
|
|
// $keys = \Kiri::getDi()->get(Getter::class);
|
|
|
|
|
// $keys->write($this->name, $class, $method);
|
2022-01-09 03:49:51 +08:00
|
|
|
return true;
|
|
|
|
|
}
|
2023-03-30 20:39:00 +08:00
|
|
|
|
|
|
|
|
|
2022-01-09 03:49:51 +08:00
|
|
|
}
|