Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| Origin | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getOrigin | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | /* |
| 3 | * This file is part of Aplus Framework Routing Library. |
| 4 | * |
| 5 | * (c) Natan Felles <natanfelles@gmail.com> |
| 6 | * |
| 7 | * For the full copyright and license information, please view the LICENSE |
| 8 | * file that was distributed with this source code. |
| 9 | */ |
| 10 | namespace Framework\Routing\Attributes; |
| 11 | |
| 12 | use Attribute; |
| 13 | |
| 14 | /** |
| 15 | * Class Origin. |
| 16 | * |
| 17 | * @package routing |
| 18 | */ |
| 19 | #[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] |
| 20 | class Origin |
| 21 | { |
| 22 | protected string $origin; |
| 23 | |
| 24 | /** |
| 25 | * Origin constructor. |
| 26 | * |
| 27 | * @param string $origin The Route origin |
| 28 | */ |
| 29 | public function __construct(string $origin) |
| 30 | { |
| 31 | $this->origin = $origin; |
| 32 | } |
| 33 | |
| 34 | public function getOrigin() : string |
| 35 | { |
| 36 | return $this->origin; |
| 37 | } |
| 38 | } |