aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AppBundle/Controller/HomeController.php30
-rw-r--r--src/AppBundle/Utils/Aqi.php43
2 files changed, 71 insertions, 2 deletions
diff --git a/src/AppBundle/Controller/HomeController.php b/src/AppBundle/Controller/HomeController.php
index f6ee8b9..d8234cf 100644
--- a/src/AppBundle/Controller/HomeController.php
+++ b/src/AppBundle/Controller/HomeController.php
@@ -11,6 +11,9 @@ namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use AppBundle\Utils\Aqi;
+
+
class HomeController extends Controller
@@ -19,8 +22,21 @@ class HomeController extends Controller
* @Route("/", name="homepage")
*/
- public function numberAction()
+
+ public function numberAction(Aqi $aqi)
{
+ $table = array(
+ 'Co' => array('breakpoints' => [0, 4.4, 4.5, 9.4, 9.5, 12.4, 12.5, 15.4, 15.5, 30.4, 30.5, 40.4, 40.5, 50.4],
+ 'aq' => [0, 50, 51, 100, 101, 150, 151, 200, 201, 300, 301, 400, 401, 500]),
+ 'So' => array('breakpoints' => [0.000, 0.034, 0.035, 0.144, 0.145, 0.224, 0.225, 0.304,