1 | <?php declare(strict_types=1); |
||
16 | class Meta |
||
17 | { |
||
18 | const NAME = 'php-api.attribute'; |
||
19 | |||
20 | /** |
||
21 | * @var Description |
||
22 | */ |
||
23 | private $description; |
||
24 | |||
25 | /** |
||
26 | * @var Operation |
||
27 | */ |
||
28 | private $operation; |
||
29 | |||
30 | /** |
||
31 | * @var Path |
||
32 | */ |
||
33 | private $path; |
||
34 | |||
35 | /** |
||
36 | * @param Description $description |
||
37 | * @param Operation $operation |
||
38 | * @param Path $path |
||
39 | */ |
||
40 | public function __construct(Description $description, Operation $operation, Path $path) |
||
46 | |||
47 | /** |
||
48 | * @param ServerRequestInterface $request |
||
49 | * @return Meta |
||
50 | */ |
||
51 | public static function getFromRequest(ServerRequestInterface $request): Meta |
||
55 | |||
56 | /** |
||
57 | * @param ServerRequestInterface $request |
||
58 | * @param Description $description |
||
59 | * @param Operation $operation |
||
60 | * @param Path $path |
||
61 | * @return ServerRequestInterface |
||
62 | */ |
||
63 | public static function requestWith( |
||
72 | |||
73 | /** |
||
74 | * @return Description |
||
75 | */ |
||
76 | public function getDescription(): Description |
||
80 | |||
81 | /** |
||
82 | * @return Operation |
||
83 | */ |
||
84 | public function getOperation(): Operation |
||
88 | |||
89 | /** |
||
90 | * @return Path |
||
91 | */ |
||
92 | public function getPath(): Path |
||
96 | } |
||
97 |