Files
zhamao-framework/src/ZM/Middleware/NeedAnnotationTrait.php
2023-03-05 23:06:40 +08:00

23 lines
396 B
PHP

<?php
declare(strict_types=1);
namespace ZM\Middleware;
use ZM\Annotation\AnnotationBase;
trait NeedAnnotationTrait
{
protected ?AnnotationBase $annotation = null;
public function setAnnotation(AnnotationBase $annotation): void
{
$this->annotation = $annotation;
}
public function getAnnotation(): ?AnnotationBase
{
return $this->annotation;
}
}