33 lines
742 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\Middleware;
2020-03-25 18:35:16 +08:00
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
2020-03-25 18:35:16 +08:00
use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target;
use ZM\Annotation\AnnotationBase;
2020-08-31 10:11:06 +08:00
use ZM\Annotation\Interfaces\ErgodicAnnotation;
2020-03-25 18:35:16 +08:00
/**
* Class Middleware
* @Annotation
* @NamedArgumentConstructor()
* @Target("ALL")
2020-03-25 18:35:16 +08:00
*/
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_ALL)]
2020-08-31 10:11:06 +08:00
class Middleware extends AnnotationBase implements ErgodicAnnotation
2020-03-25 18:35:16 +08:00
{
/**
2025-03-17 14:13:54 +08:00
* @param mixed $name
2020-03-25 18:35:16 +08:00
*/
public function __construct(
/**
* @Required()
*/
public $name,
public array $args = []
2024-10-02 20:31:16 +08:00
) {}
}