This commit is contained in:
2021-02-22 17:44:24 +08:00
parent 3b09b9a308
commit 2d1f83cf09
34 changed files with 732 additions and 222 deletions
+20 -1
View File
@@ -4,15 +4,19 @@
namespace Annotation\Model;
use Annotation\Annotation;
use Annotation\IAnnotation;
use Attribute;
use Database\ActiveRecord;
use Snowflake\Exception\ComponentException;
use Snowflake\Snowflake;
/**
* Class Get
* @package Annotation\Model
*/
#[Attribute(Attribute::TARGET_METHOD)] class Get
#[Attribute(Attribute::TARGET_METHOD)] class Get implements IAnnotation
{
@@ -27,4 +31,19 @@ use Database\ActiveRecord;
}
/**
* @param array $handler
* @return Annotation
* @throws ComponentException
*/
public function execute(array $handler): Annotation
{
// TODO: Implement execute() method.
$annotation = Snowflake::app()->getAttributes();
$annotation->addMethodAttribute($handler, $this->name);
return $annotation;
}
}