2020-03-25 18:35:16 +08:00
|
|
|
<?php
|
|
|
|
|
|
2022-03-15 18:05:33 +08:00
|
|
|
declare(strict_types=1);
|
2020-03-25 18:35:16 +08:00
|
|
|
|
|
|
|
|
namespace ZM\Annotation\Http;
|
|
|
|
|
|
2022-03-20 01:53:36 +08:00
|
|
|
use Attribute;
|
|
|
|
|
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
|
2020-09-29 15:07:43 +08:00
|
|
|
use Doctrine\Common\Annotations\Annotation\Required;
|
2020-03-25 18:35:16 +08:00
|
|
|
use Doctrine\Common\Annotations\Annotation\Target;
|
|
|
|
|
use ZM\Annotation\AnnotationBase;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class MiddlewareClass
|
|
|
|
|
* @Annotation
|
2022-03-20 01:53:36 +08:00
|
|
|
* @NamedArgumentConstructor()
|
2020-03-25 18:35:16 +08:00
|
|
|
* @Target("CLASS")
|
|
|
|
|
*/
|
2022-03-20 01:53:36 +08:00
|
|
|
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
|
2020-03-25 18:35:16 +08:00
|
|
|
class MiddlewareClass extends AnnotationBase
|
|
|
|
|
{
|
2020-09-29 15:07:43 +08:00
|
|
|
/**
|
|
|
|
|
* @var string
|
|
|
|
|
* @Required()
|
|
|
|
|
*/
|
|
|
|
|
public $name = '';
|
2022-03-20 01:53:36 +08:00
|
|
|
|
|
|
|
|
public function __construct($name)
|
|
|
|
|
{
|
|
|
|
|
$this->name = $name;
|
|
|
|
|
}
|
2020-09-29 15:07:43 +08:00
|
|
|
}
|