File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types=1 );
4+
35/**
46 * This Source Code Form is subject to the terms of the Mozilla Public
57 * License, v. 2.0. If a copy of the MPL was not distributed with this
911 * @license https://mozilla.org/MPL/2.0/ MPL-2.0
1012 */
1113
12- namespace Rudra \Router ;
13-
14- #[\Attribute]
15- class Routing
14+ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE )]
15+ class AfterMiddleware
1616{
17-
17+ public function __construct (
18+ public string $ name ,
19+ public string |null $ params = null
20+ ) {}
1821}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ /**
6+ * This Source Code Form is subject to the terms of the Mozilla Public
7+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+ *
10+ * @author Korotkov Danila (Jagepard) <jagepard@yandex.ru>
11+ * @license https://mozilla.org/MPL/2.0/ MPL-2.0
12+ */
13+
14+ namespace Rudra \Router \Attributes ;
15+
16+ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE )]
17+ class Middleware
18+ {
19+ public function __construct (
20+ public string $ name ,
21+ public string |null $ params = null
22+ ) {}
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * This Source Code Form is subject to the terms of the Mozilla Public
5+ * License, v. 2.0. If a copy of the MPL was not distributed with this
6+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+ *
8+ * @author Korotkov Danila (Jagepard) <jagepard@yandex.ru>
9+ * @license https://mozilla.org/MPL/2.0/ MPL-2.0
10+ */
11+
12+ namespace Rudra \Router \Attributes ;
13+
14+ #[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE )]
15+ class Routing
16+ {
17+ public function __construct (
18+ public string $ url = '' ,
19+ public string |array $ method = 'GET '
20+ ) {}
21+ }
You can’t perform that action at this time.
0 commit comments