Files
kiri-core/kiri-annotation/AbstractAttribute.php
T

69 lines
902 B
PHP
Raw Normal View History

2022-02-23 16:32:08 +08:00
<?php
namespace Kiri\Annotation;
2022-06-24 15:07:46 +08:00
use ReturnTypeWillChange;
2022-02-23 16:32:08 +08:00
/**
* Class Attribute
* @package Annotation
*/
abstract class AbstractAttribute implements IAnnotation
{
2022-07-09 23:48:01 +08:00
protected object $_class;
2022-06-24 15:07:46 +08:00
2022-07-09 23:48:01 +08:00
protected string $_method;
2022-06-24 15:07:46 +08:00
/**
* @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
{
2022-07-09 23:48:01 +08:00
return $this->_class;
2022-06-24 15:07:46 +08:00
}
/**
* @param object $class
*/
public function setClass(object $class): void
{
2022-07-09 23:48:01 +08:00
$this->_class = $class;
2022-06-24 15:07:46 +08:00
}
/**
* @return string
*/
public function getMethod(): string
{
2022-07-09 23:48:01 +08:00
return $this->_method;
2022-06-24 15:07:46 +08:00
}
/**
* @param string $method
*/
public function setMethod(string $method): void
{
2022-07-09 23:48:01 +08:00
$this->_method = $method;
2022-06-24 15:07:46 +08:00
}
2022-02-23 16:32:08 +08:00
}