blob: e98c5803f3d6d18b8c386b86cfa9301d3e346aa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
declare(strict_types=1);
namespace BrettParson\MiniRoute\Attribute;
use Attribute;
/**
* Declares middleware to apply to a controller method or class.
*
* Repeatable, and valid on both classes (applies to every method) and
* individual methods (applies only to that method).
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Middleware
{
public function __construct(public readonly string $middlewareClass)
{
}
}
|