sandraKh /
weather-module
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Anax\Weather; |
||
| 4 | |||
| 5 | use Anax\Commons\ContainerInjectableInterface; |
||
| 6 | use Anax\Commons\ContainerInjectableTrait; |
||
| 7 | use Anax\Route\Exception\NotFoundException; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * A controller to ease with development and debugging information. |
||
| 11 | */ |
||
| 12 | class JsonApiController implements ContainerInjectableInterface |
||
| 13 | { |
||
| 14 | use ContainerInjectableTrait; |
||
| 15 | |||
| 16 | 1 | public function indexAction() : array |
|
| 17 | { |
||
| 18 | 1 | $city = $this->di->request->getGet("city"); |
|
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 19 | 1 | $cnt = $this->di->request->getGet("cnt"); |
|
| 20 | 1 | $weatherModel = $this->di->get("weatherhelper"); |
|
| 21 | 1 | $days = explode(" ", $cnt); |
|
| 22 | |||
| 23 | 1 | $info = $weatherModel->getUsersThroughMultiCurl($days, $city); |
|
| 24 | |||
| 25 | 1 | return [$info]; |
|
| 26 | } |
||
| 27 | } |
||
| 28 |