zhamao-framework/src/ZM/Annotation/Http/MiddlewareClass.php

33 lines
658 B
PHP
Raw Normal View History

2020-03-25 18:35:16 +08:00
<?php
declare(strict_types=1);
2020-03-25 18:35:16 +08:00
namespace ZM\Annotation\Http;
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
* @NamedArgumentConstructor()
2020-03-25 18:35:16 +08:00
* @Target("CLASS")
*/
#[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 = '';
public function __construct($name)
{
$this->name = $name;
}
2020-09-29 15:07:43 +08:00
}