|
1 | 1 | <?php
|
2 | 2 | namespace Eukles\Container {
|
3 |
| - |
| 3 | + |
4 | 4 | use Eukles\Config\ConfigInterface;
|
5 | 5 | use Eukles\Entity\EntityFactoryInterface;
|
6 | 6 | use Eukles\Service\Pagination\RequestPaginationInterface;
|
|
10 | 10 | use Eukles\Service\RoutesClasses\RoutesClassesInterface;
|
11 | 11 | use Eukles\Slim\Handlers\ActionErrorInterface;
|
12 | 12 | use Eukles\Slim\Handlers\EntityRequestErrorInterface;
|
| 13 | + use Psr\Container\ContainerExceptionInterface; |
| 14 | + use Psr\Container\NotFoundExceptionInterface; |
| 15 | + use Psr\Http\Message\ResponseInterface; |
13 | 16 | use Psr\Http\Message\ServerRequestInterface;
|
14 |
| - use Slim\Interfaces\RouterInterface; |
15 |
| - |
| 17 | + |
16 | 18 | class ContainerMock implements ContainerInterface
|
17 | 19 | {
|
18 |
| - |
| 20 | + |
19 | 21 | /**
|
20 | 22 | * @inheritdoc
|
21 | 23 | */
|
22 |
| - public function get($id) { } |
23 |
| - |
| 24 | + public function has($id) { } |
| 25 | + |
24 | 26 | /**
|
25 | 27 | * @return ActionErrorInterface
|
26 | 28 | */
|
27 | 29 | public function getActionErrorHandler(): ActionErrorInterface
|
28 | 30 | {
|
29 | 31 | // TODO: Implement getActionErrorHandler() method.
|
30 | 32 | }
|
31 |
| - |
| 33 | + |
32 | 34 | /**
|
33 | 35 | * @return ConfigInterface
|
34 | 36 | */
|
35 | 37 | public function getConfig(): ConfigInterface
|
36 | 38 | {
|
37 | 39 | // TODO: Implement getConfig() method.
|
38 | 40 | }
|
39 |
| - |
| 41 | + |
40 | 42 | /**
|
41 | 43 | * @return EntityFactoryInterface
|
42 | 44 | */
|
43 | 45 | public function getEntityFactory(): EntityFactoryInterface
|
44 | 46 | {
|
45 | 47 | // TODO: Implement getEntityFactory() method.
|
46 | 48 | }
|
47 |
| - |
| 49 | + |
48 | 50 | /**
|
49 | 51 | * @return EntityRequestErrorInterface
|
50 | 52 | */
|
51 | 53 | public function getEntityRequestErrorHandler(): EntityRequestErrorInterface
|
52 | 54 | {
|
53 | 55 | // TODO: Implement getEntityRequestErrorHandler() method.
|
54 | 56 | }
|
55 |
| - |
| 57 | + |
56 | 58 | /**
|
57 | 59 | * @return ServerRequestInterface
|
58 | 60 | */
|
59 | 61 | public function getRequest(): ServerRequestInterface
|
60 | 62 | {
|
61 | 63 | // TODO: Implement getRequest() method.
|
62 | 64 | }
|
63 |
| - |
| 65 | + |
64 | 66 | /**
|
65 | 67 | * @return RequestPaginationInterface
|
66 | 68 | */
|
67 | 69 | public function getRequestPagination(): RequestPaginationInterface
|
68 | 70 | {
|
69 | 71 | // TODO: Implement getRequestPagination() method.
|
70 | 72 | }
|
71 |
| - |
| 73 | + |
72 | 74 | /**
|
73 | 75 | * @return RequestQueryModifierInterface
|
74 | 76 | */
|
75 | 77 | public function getRequestQueryModifier(): RequestQueryModifierInterface
|
76 | 78 | {
|
77 | 79 | // TODO: Implement getRequestQueryModifier() method.
|
78 | 80 | }
|
79 |
| - |
| 81 | + |
| 82 | + /** |
| 83 | + * @return ResponseInterface |
| 84 | + */ |
| 85 | + public function getResponse(): ResponseInterface |
| 86 | + { |
| 87 | + // TODO: Implement getResponse() method. |
| 88 | + } |
| 89 | + |
80 | 90 | /**
|
81 | 91 | * @return ResponseBuilderInterface
|
82 | 92 | */
|
83 | 93 | public function getResponseBuilder(): ResponseBuilderInterface
|
84 | 94 | {
|
85 | 95 | // TODO: Implement getResponseBuilder() method.
|
86 | 96 | }
|
87 |
| - |
| 97 | + |
88 | 98 | /**
|
89 | 99 | * @return ResponseFormatterInterface
|
90 | 100 | */
|
91 | 101 | public function getResponseFormatter(): ResponseFormatterInterface
|
92 | 102 | {
|
93 | 103 | // TODO: Implement getResponseFormatter() method.
|
94 | 104 | }
|
95 |
| - |
| 105 | + |
| 106 | + /** |
| 107 | + * Result is populated in ActionStrategy and becomes available in middlewares post-app |
| 108 | + * |
| 109 | + * @return mixed |
| 110 | + */ |
| 111 | + public function getResult() |
| 112 | + { |
| 113 | + // TODO: Implement getResult() method. |
| 114 | + } |
| 115 | + |
96 | 116 | /**
|
97 |
| - * @return RouterInterface |
| 117 | + * @param $result |
| 118 | + * |
| 119 | + * @return void |
98 | 120 | */
|
99 |
| - public function getRouter(): RouterInterface |
| 121 | + public function setResult($result) |
| 122 | + { |
| 123 | + // TODO: Implement setResult() method. |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * @return \Eukles\Service\Router\RouterInterface |
| 128 | + */ |
| 129 | + public function getRouter(): \Eukles\Service\Router\RouterInterface |
100 | 130 | {
|
101 | 131 | // TODO: Implement getRouter() method.
|
102 | 132 | }
|
103 |
| - |
| 133 | + |
104 | 134 | /**
|
105 | 135 | * @return RoutesClassesInterface
|
106 | 136 | */
|
107 | 137 | public function getRoutesClasses(): RoutesClassesInterface
|
108 | 138 | {
|
109 | 139 | // TODO: Implement getRoutesClasses() method.
|
110 | 140 | }
|
111 |
| - |
| 141 | + |
112 | 142 | /**
|
113 |
| - * @inheritdoc |
| 143 | + * Finds an entry of the container by its identifier and returns it. |
| 144 | + * |
| 145 | + * @param string $id Identifier of the entry to look for. |
| 146 | + * |
| 147 | + * @throws NotFoundExceptionInterface No entry was found for **this** identifier. |
| 148 | + * @throws ContainerExceptionInterface Error while retrieving the entry. |
| 149 | + * |
| 150 | + * @return mixed Entry. |
114 | 151 | */
|
115 |
| - public function has($id) { } |
| 152 | + public function get($id) |
| 153 | + { |
| 154 | + // TODO: Implement get() method. |
| 155 | + } |
116 | 156 | }
|
117 | 157 | }
|
0 commit comments