改名
This commit is contained in:
@@ -5,18 +5,15 @@ 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 implements IAnnotation
|
||||
#[Attribute(Attribute::TARGET_METHOD)] class Get extends \Annotation\Attribute
|
||||
{
|
||||
|
||||
|
||||
@@ -33,16 +30,14 @@ use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
* @param array $handler
|
||||
* @return Annotation
|
||||
* @throws ComponentException
|
||||
* @return ActiveRecord
|
||||
*/
|
||||
public function execute(array $handler): Annotation
|
||||
public function execute(array $handler): ActiveRecord
|
||||
{
|
||||
// TODO: Implement execute() method.
|
||||
$annotation = Snowflake::app()->getAttributes();
|
||||
$annotation->addMethodAttribute($handler, $this->name);
|
||||
/** @var ActiveRecord $activeRecord */
|
||||
[$activeRecord, $method] = $handler;
|
||||
|
||||
return $annotation;
|
||||
return $activeRecord->addGets($this->name, $method);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user