From d2dd255c90ae60a82d77a567900d83782842ef2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 24 Jun 2022 15:07:46 +0800 Subject: [PATCH] modify plugin name --- kiri-annotation/AbstractAttribute.php | 63 ++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 11 deletions(-) diff --git a/kiri-annotation/AbstractAttribute.php b/kiri-annotation/AbstractAttribute.php index 1938e86c..3b5a7086 100644 --- a/kiri-annotation/AbstractAttribute.php +++ b/kiri-annotation/AbstractAttribute.php @@ -4,6 +4,8 @@ namespace Kiri\Annotation; +use ReturnTypeWillChange; + /** * Class Attribute * @package Annotation @@ -12,16 +14,55 @@ abstract class AbstractAttribute implements IAnnotation { - /** - * @param static $class - * @param mixed|string $method - * @return mixed - */ - #[\Kiri\ReturnTypeWillChange] - public function execute(mixed $class, mixed $method = ''): mixed - { - // TODO: Implement execute() method. - return true; - } + protected object $class; + + + protected string $method; + + + /** + * @param static $class + * @param mixed|string $method + * @return mixed + */ + #[ReturnTypeWillChange] + public function execute(mixed $class, mixed $method = ''): mixed + { + // TODO: Implement execute() method. + return true; + } + + /** + * @return object + */ + public function getClass(): object + { + return $this->class; + } + + /** + * @param object $class + */ + public function setClass(object $class): void + { + $this->class = $class; + } + + /** + * @return string + */ + public function getMethod(): string + { + return $this->method; + } + + /** + * @param string $method + */ + public function setMethod(string $method): void + { + $this->method = $method; + } + }