mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-20 23:25:35 +08:00
update to 3.0.0-alpha2 (build 610): refactor driver
This commit is contained in:
39
src/ZM/Annotation/Middleware/Middleware.php
Normal file
39
src/ZM/Annotation/Middleware/Middleware.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ZM\Annotation\Middleware;
|
||||
|
||||
use Attribute;
|
||||
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
|
||||
use Doctrine\Common\Annotations\Annotation\Required;
|
||||
use Doctrine\Common\Annotations\Annotation\Target;
|
||||
use ZM\Annotation\AnnotationBase;
|
||||
use ZM\Annotation\Interfaces\ErgodicAnnotation;
|
||||
|
||||
/**
|
||||
* Class Middleware
|
||||
* @Annotation
|
||||
* @NamedArgumentConstructor()
|
||||
* @Target("ALL")
|
||||
*/
|
||||
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_ALL)]
|
||||
class Middleware extends AnnotationBase implements ErgodicAnnotation
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @Required()
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $params = [];
|
||||
|
||||
public function __construct($name, $params = [])
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->params = $params;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user