aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--.idea/modules.xml8
-rw-r--r--.idea/php.xml46
-rw-r--r--.idea/pollution-sensor.iml49
-rw-r--r--.idea/symfony2.xml6
-rw-r--r--.idea/vcs.xml6
-rw-r--r--.idea/workspace.xml799
-rw-r--r--app/Resources/views/default/index.html.twig2
-rw-r--r--app/config/services.yml3
-rw-r--r--src/AppBundle/Controller/HomeController.php30
-rw-r--r--src/AppBundle/Utils/Aqi.php43
11 files changed, 79 insertions, 917 deletions
diff --git a/.gitignore b/.gitignore
index eaac344..16e54e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,8 @@
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
+<<<<<<< HEAD
+.idea
+=======
/.idea/
+>>>>>>> 72114be2d32b090f68996acb87cef7fde748b534
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index febbf1b..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ProjectModuleManager">
- <modules>
- <module fileurl="file://$PROJECT_DIR$/.idea/pollution-sensor.iml" filepath="$PROJECT_DIR$/.idea/pollution-sensor.iml" />
- </modules>
- </component>
-</project> \ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
deleted file mode 100644
index 10d798a..0000000
--- a/.idea/php.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="PhpIncludePathManager">
- <include_path>
- <path value="$PROJECT_DIR$/vendor/doctrine/orm" />
- <path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
- <path value="$PROJECT_DIR$/vendor/sensio/framework-extra-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" />
- <path value="$PROJECT_DIR$/vendor/sensio/distribution-bundle" />
- <path value="$PROJECT_DIR$/vendor/sensio/generator-bundle" />
- <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
- <path value="$PROJECT_DIR$/vendor/sensiolabs/security-checker" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-apcu" />
- <path value="$PROJECT_DIR$/vendor/fig/link-util" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" />
- <path value="$PROJECT_DIR$/vendor/symfony/swiftmailer-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php56" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-util" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
- <path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/symfony" />
- <path value="$PROJECT_DIR$/vendor/twig/twig" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php70" />
- <path value="$PROJECT_DIR$/vendor/psr/container" />
- <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-cache-bundle" />
- <path value="$PROJECT_DIR$/vendor/psr/cache" />
- <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
- <path value="$PROJECT_DIR$/vendor/psr/log" />
- <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" />
- <path value="$PROJECT_DIR$/vendor/psr/link" />
- <path value="$PROJECT_DIR$/vendor/doctrine/common" />
- <path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
- <path value="$PROJECT_DIR$/vendor/doctrine/collections" />
- <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
- <path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
- <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
- <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
- <path value="$PROJECT_DIR$/vendor/incenteev/composer-parameter-handler" />
- <path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
- <path value="$PROJECT_DIR$/vendor/swiftmailer/swiftmailer" />
- <path value="$PROJECT_DIR$/vendor/composer" />
- <path value="$PROJECT_DIR$/vendor/jdorn/sql-formatter" />
- </include_path>
- </component>
- <component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
-</project> \ No newline at end of file
diff --git a/.idea/pollution-sensor.iml b/.idea/pollution-sensor.iml
deleted file mode 100644
index 2df1551..0000000
--- a/.idea/pollution-sensor.iml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="WEB_MODULE" version="4">
- <component name="NewModuleRootManager">
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src/AppBundle" isTestSource="false" packagePrefix="AppBundle\" />
- <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Tests\" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/annotations" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/collections" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/common" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/dbal" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-cache-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/orm" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/fig/link-util" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/incenteev/composer-parameter-handler" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/jdorn/sql-formatter" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/paragonie/random_compat" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/psr/link" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/sensio/distribution-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/sensio/framework-extra-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/sensio/generator-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/sensiolabs/security-checker" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/monolog-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/phpunit-bridge" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-apcu" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-icu" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php56" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php70" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-util" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/swiftmailer-bundle" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/symfony" />
- <excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module> \ No newline at end of file
diff --git a/.idea/symfony2.xml b/.idea/symfony2.xml
deleted file mode 100644
index bd98e40..0000000
--- a/.idea/symfony2.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="Symfony2PluginSettings">
- <option name="pluginEnabled" value="true" />
- </component>
-</project> \ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="VcsDirectoryMappings">
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
- </component>
-</project> \ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 61d3c4b..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,799 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ChangeListManager">
- <list default="true" id="c02a68ca-4895-49ef-94e1-572ab8cf87ba" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/AppBundle/Controller/EmailController.php" afterPath="$PROJECT_DIR$/src/AppBundle/Controller/EmailController.php" />
- </list>
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
- <option name="TRACKING_ENABLED" value="true" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="ComposerSettings" synchronizationState="SYNCHRONIZE">
- <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
- <executablePath>composer</executablePath>
- </component>
- <component name="FileEditorManager">
- <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
- <file leaf-file-name="HomeController.php" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="262">
- <caret line="36" column="0" lean-forward="true" selection-start-line="36" selection-start-column="0" selection-end-line="36" selection-end-column="0" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="AppBundle.php" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="NewDataController.php" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/NewDataController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="247">
- <caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="EmailController.php" pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/EmailController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="27" column="22" lean-forward="false" selection-start-line="27" selection-start-column="22" selection-end-line="27" selection-end-column="22" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="registration.php" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/Resources/views/emails/registration.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="45">
- <caret line="3" column="46" lean-forward="false" selection-start-line="3" selection-start-column="46" selection-end-line="3" selection-end-column="46" />
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="parameters.yml.dist" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/config/parameters.yml.dist">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="index.html.twig" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="165">
- <caret line="11" column="28" lean-forward="false" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
- <folding>
- <marker date="1512037842125" expanded="true" signature="32:565" ph="{% block body ...%}" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="realtime.js" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/web/js/realtime.js">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="1365">
- <caret line="91" column="25" lean-forward="false" selection-start-line="91" selection-start-column="25" selection-end-line="91" selection-end-column="25" />
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="app.php" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/web/app.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="12" column="1" lean-forward="false" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="FileTemplateManagerImpl">
- <option name="RECENT_TEMPLATES">
- <list>
- <option value="JavaScript File" />
- </list>
- </option>
- </component>
- <component name="FindInProjectRecents">
- <replaceStrings>
- <replace />
- </replaceStrings>
- <dirStrings>
- <dir>$PROJECT_DIR$/web</dir>
- </dirStrings>
- </component>
- <component name="Git.Settings">
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
- </component>
- <component name="IdeDocumentHistory">
- <option name="CHANGED_PATHS">
- <list>
- <option value="$PROJECT_DIR$/composer.json" />
- <option value="$PROJECT_DIR$/app/AppKernel.php" />
- <option value="$PROJECT_DIR$/src/AppBundle/View/Home.php" />
- <option value="$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php" />
- <option value="$PROJECT_DIR$/bin/console" />
- <option value="$PROJECT_DIR$/src/AppBundle/Controller/NewData.php" />
- <option value="$PROJECT_DIR$/app/Resources/views/default/index.html.twig" />
- <option value="$PROJECT_DIR$/web/js/realtime.js" />
- <option value="$PROJECT_DIR$/app/config/parameters.yml" />
- <option value="$PROJECT_DIR$/src/AppBundle/Controller/NewDataController.php" />
- <option value="$PROJECT_DIR$/src/AppBundle/Controller/EmailController.php" />
- </list>
- </option>
- </component>
- <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
- <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
- <component name="JsGulpfileManager">
- <detection-done>true</detection-done>
- <sorting>DEFINITION_ORDER</sorting>
- </component>
- <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true">
- <include_path>
- <path value="$PROJECT_DIR$/vendor/doctrine/orm" />
- <path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
- <path value="$PROJECT_DIR$/vendor/sensio/framework-extra-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" />
- <path value="$PROJECT_DIR$/vendor/sensio/distribution-bundle" />
- <path value="$PROJECT_DIR$/vendor/sensio/generator-bundle" />
- <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
- <path value="$PROJECT_DIR$/vendor/sensiolabs/security-checker" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-apcu" />
- <path value="$PROJECT_DIR$/vendor/fig/link-util" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" />
- <path value="$PROJECT_DIR$/vendor/symfony/swiftmailer-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php56" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-util" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
- <path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" />
- <path value="$PROJECT_DIR$/vendor/symfony/symfony" />
- <path value="$PROJECT_DIR$/vendor/twig/twig" />
- <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php70" />
- <path value="$PROJECT_DIR$/vendor/psr/container" />
- <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-cache-bundle" />
- <path value="$PROJECT_DIR$/vendor/psr/cache" />
- <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
- <path value="$PROJECT_DIR$/vendor/psr/log" />
- <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" />
- <path value="$PROJECT_DIR$/vendor/psr/link" />
- <path value="$PROJECT_DIR$/vendor/doctrine/common" />
- <path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
- <path value="$PROJECT_DIR$/vendor/doctrine/collections" />
- <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
- <path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
- <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
- <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
- <path value="$PROJECT_DIR$/vendor/incenteev/composer-parameter-handler" />
- <path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
- <path value="$PROJECT_DIR$/vendor/swiftmailer/swiftmailer" />
- <path value="$PROJECT_DIR$/vendor/composer" />
- <path value="$PROJECT_DIR$/vendor/jdorn/sql-formatter" />
- </include_path>
- </component>
- <component name="ProjectFrameBounds" extendedState="6">
- <option name="x" value="293" />
- <option name="y" value="47" />
- <option name="width" value="957" />
- <option name="height" value="741" />
- </component>
- <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
- <component name="ProjectView">
- <navigator currentView="ProjectPane" proportions="" version="1">
- <flattenPackages />
- <showMembers />
- <showModules />
- <showLibraryContents />
- <hideEmptyPackages />
- <abbreviatePackageNames />
- <autoscrollToSource />
- <autoscrollFromSource />
- <sortByType />
- <manualOrder />
- <foldersAlwaysOnTop value="true" />
- </navigator>
- <panes>
- <pane id="Scope" />
- <pane id="ProjectPane">
- <subPane>
- <expand>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="config" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="Resources" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="Resources" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="views" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="AppBundle" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- <path>
- <item name="pollutometer" type="b2602c69:ProjectViewProjectNode" />
- <item name="pollutometer" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="AppBundle" type="2a2b976b:PhpTreeStructureProvider$1" />
- <item name="Controller" type="2a2b976b:PhpTreeStructureProvider$1" />
- </path>
- </expand>
- <select />
- </subPane>
- </pane>
- <pane id="Scratches" />
- </panes>
- </component>
- <component name="PropertiesComponent">
- <property name="WebServerToolWindowFactoryState" value="false" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
- <property name="settings.editor.selected.configurable" value="Symfony2.SettingsForm" />
- </component>
- <component name="RunDashboard">
- <option name="ruleStates">
- <list>
- <RuleState>
- <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
- </RuleState>
- <RuleState>
- <option name="name" value="StatusDashboardGroupingRule" />
- </RuleState>
- </list>
- </option>
- </component>
- <component name="RunManager" selected="JavaScript Debug.HomeController.php">
- <configuration name="HomeController.php" type="JavascriptDebugType" factoryName="JavaScript Debug" temporary="true" nameIsGenerated="true" uri="http://localhost:63342/pollution-sensor/Controller/HomeController.php" />
- <recent_temporary>
- <list size="1">
- <item index="0" class="java.lang.String" itemvalue="JavaScript Debug.HomeController.php" />
- </list>
- </recent_temporary>
- </component>
- <component name="ShelveChangesManager" show_recycled="false">
- <option name="remove_strategy" value="false" />
- </component>
- <component name="TaskManager">
- <task active="true" id="Default" summary="Default task">
- <changelist id="c02a68ca-4895-49ef-94e1-572ab8cf87ba" name="Default" comment="" />
- <created>1511345646113</created>
- <option name="number" value="Default" />
- <option name="presentableId" value="Default" />
- <updated>1511345646113</updated>
- <workItem from="1511345662865" duration="174000" />
- <workItem from="1511346151555" duration="377000" />
- <workItem from="1511346717882" duration="176000" />
- <workItem from="1511347081605" duration="1264000" />
- <workItem from="1511428524892" duration="6187000" />
- <workItem from="1511512197156" duration="4678000" />
- </task>
- <task id="LOCAL-00001" summary="Added email controller.">
- <created>1512042339566</created>
- <option name="number" value="00001" />
- <option name="presentableId" value="LOCAL-00001" />
- <option name="project" value="LOCAL" />
- <updated>1512042339566</updated>
- </task>
- <task id="LOCAL-00002" summary="Merge.">
- <created>1512042380391</created>
- <option name="number" value="00002" />
- <option name="presentableId" value="LOCAL-00002" />
- <option name="project" value="LOCAL" />
- <updated>1512042380391</updated>
- </task>
- <option name="localTasksCounter" value="3" />
- <servers />
- </component>
- <component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="16666000" />
- </component>
- <component name="ToolWindowManager">
- <frame x="293" y="47" width="1366" height="741" extended-state="6" />
- <editor active="true" />
- <layout>
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.12884334" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32917318" sideWeight="0.50292826" order="7" side_tool="true" content_ui="tabs" />
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32917318" sideWeight="0.49707174" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32917318" sideWeight="0.4956076" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25429016" sideWeight="0.4848485" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39968404" sideWeight="0.49634275" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
- <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39968404" sideWeight="0.5036573" order="7" side_tool="true" content_ui="tabs" />
- <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25458997" sideWeight="0.4848485" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.12898003" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39968404" sideWeight="0.49634275" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
- </layout>
- </component>
- <component name="TypeScriptGeneratedFilesManager">
- <option name="version" value="1" />
- </component>
- <component name="Vcs.Log.Tabs.Properties">
- <option name="TAB_STATES">
- <map>
- <entry key="MAIN">
- <value>
- <State>
- <option name="RECENTLY_FILTERED_USER_GROUPS">
- <collection />
- </option>
- <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
- <collection />
- </option>
- <option name="COLUMN_ORDER">
- <list>
- <option value="0" />
- <option value="1" />
- <option value="2" />
- <option value="3" />
- </list>
- </option>
- </State>
- </value>
- </entry>
- </map>
- </option>
- </component>
- <component name="VcsContentAnnotationSettings">
- <option name="myLimit" value="2678400000" />
- </component>
- <component name="VcsManagerConfiguration">
- <option name="CHECK_NEW_TODO" value="false" />
- <MESSAGE value="Added sending e-mails test." />
- <MESSAGE value="Added parameters back." />
- <MESSAGE value="Added email controller." />
- <MESSAGE value="Merge." />
- <option name="LAST_COMMIT_MESSAGE" value="Merge." />
- </component>
- <component name="XDebuggerManager">
- <breakpoint-manager>
- <option name="time" value="1" />
- </breakpoint-manager>
- <watches-manager />
- </component>
- <component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/apple-touch-icon.png">
- <provider selected="true" editor-type-id="images">
- <state />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/app_dev.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php" />
- <entry file="file://$PROJECT_DIR$/src/AppBundle/View/Home.php" />
- <entry file="file://$PROJECT_DIR$/tests/AppBundle/Controller/DefaultControllerTest.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="270">
- <caret line="15" column="95" lean-forward="true" selection-start-line="15" selection-start-column="95" selection-end-line="15" selection-end-column="95" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/.gitignore">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="288">
- <caret line="16" column="13" lean-forward="true" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/bin/console">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="144">
- <caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/.web-server-pid" />
- <entry file="file://$PROJECT_DIR$/app/Resources/views/base.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="10" column="25" lean-forward="false" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/app.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="12" column="1" lean-forward="false" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/config/services.yml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-184">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="165">
- <caret line="11" column="28" lean-forward="false" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
- <folding>
- <marker date="1512037842125" expanded="true" signature="32:565" ph="{% block body ...%}" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/js/realtime.js">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="390">
- <caret line="26" column="25" lean-forward="false" selection-start-line="26" selection-start-column="25" selection-end-line="26" selection-end-column="25" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="375">
- <caret line="32" column="0" lean-forward="false" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/NewDataController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="795">
- <caret line="77" column="0" lean-forward="true" selection-start-line="77" selection-start-column="0" selection-end-line="77" selection-end-column="0" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/config/config.yml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-90">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="1" selection-end-column="34" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="5" lean-forward="true" selection-start-line="0" selection-start-column="5" selection-end-line="0" selection-end-column="5" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="306">
- <caret line="17" column="16" lean-forward="false" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
- <folding>
- <marker date="1512037842125" expanded="true" signature="32:565" ph="{% block body ...%}" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="468">
- <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/composer.json">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="1" column="13" lean-forward="false" selection-start-line="1" selection-start-column="13" selection-end-line="1" selection-end-column="13" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/apple-touch-icon.png">
- <provider selected="true" editor-type-id="images">
- <state />
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/app_dev.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="18">
- <caret line="26" column="82" lean-forward="false" selection-start-line="26" selection-start-column="82" selection-end-line="26" selection-end-column="82" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php" />
- <entry file="file://$PROJECT_DIR$/src/AppBundle/View/Home.php" />
- <entry file="file://$PROJECT_DIR$/tests/AppBundle/Controller/DefaultControllerTest.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="270">
- <caret line="15" column="95" lean-forward="true" selection-start-line="15" selection-start-column="95" selection-end-line="15" selection-end-column="95" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/.gitignore">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="288">
- <caret line="16" column="13" lean-forward="true" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/bin/console">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="144">
- <caret line="10" column="14" lean-forward="true" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/.web-server-pid" />
- <entry file="file://$PROJECT_DIR$/app/Resources/views/base.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="10" column="25" lean-forward="false" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/app.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="12" column="1" lean-forward="false" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/config/services.yml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-184">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="165">
- <caret line="11" column="28" lean-forward="false" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
- <folding>
- <marker date="1512037842125" expanded="true" signature="32:565" ph="{% block body ...%}" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/web/js/realtime.js">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="1365">
- <caret line="91" column="25" lean-forward="false" selection-start-line="91" selection-start-column="25" selection-end-line="91" selection-end-column="25" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/config/parameters.yml.dist">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/Resources/views/emails/registration.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="45">
- <caret line="3" column="46" lean-forward="false" selection-start-line="3" selection-start-column="46" selection-end-line="3" selection-end-column="46" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/app/config/parameters.yml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="195">
- <caret line="13" column="26" lean-forward="true" selection-start-line="13" selection-start-column="26" selection-end-line="13" selection-end-column="26" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/NewDataController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="247">
- <caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/HomeController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="262">
- <caret line="36" column="0" lean-forward="true" selection-start-line="36" selection-start-column="0" selection-end-line="36" selection-end-column="0" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="0">
- <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
- <folding />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/EmailController.php">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="180">
- <caret line="27" column="22" lean-forward="false" selection-start-line="27" selection-start-column="22" selection-end-line="27" selection-end-column="22" />
- <folding>
- <element signature="e#6#87#0#PHP" expanded="true" />
- <element signature="e#122#181#0#PHP" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </component>
-</project> \ No newline at end of file
diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig
index 1ec4bd6..2fc12a2 100644
--- a/app/Resources/views/default/index.html.twig
+++ b/app/Resources/views/default/index.html.twig
@@ -17,7 +17,7 @@
</tr>
</table>
</div>
- <p id="aq"></p>
+ <p id="aq">{{ Aqi }}</p>
<img src="https://www.ourair.org/wp-content/uploads/AQItable.gif">
{% endblock %}
{% block javascripts %}
diff --git a/app/config/services.yml b/app/config/services.yml
index cdb1c65..7ddee7c 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -29,6 +29,9 @@ services:
public: true
tags: ['controller.service_arguments']
+ AppBundle\Utils\Aqi:
+ public: false
+
# add more services, or override services that need manual wiring
# AppBundle\Service\ExampleService:
# arguments:
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, 0.305, 0.604, 0.605, 0.804, 0.805, 1.004],
+ 'aq' => [0, 50, 51, 100, 101, 150, 151, 200, 201, 300, 301, 400, 401, 500]),
+ 'No' => array('breakpoints' => [0,0.05,0.08,0.10,0.15,0.20,0.25 ,0.31,0.65, 1.24, 1.25, 1.64, 1.65, 2.04],
+ 'aq' => [0 ,50 ,51 ,100 ,101 ,150 ,151,200,201, 300, 301, 400, 401, 500])
+ );
+
+
+ $tableObj = json_decode(json_encode($table));
+
// Get cURL resource
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://pollutometerapi.azurewebsites.net/api/Readings/latest");
@@ -34,8 +50,18 @@ class HomeController extends Controller
$data = json_decode($resp, true);
$data['TimeStamp'] = gmdate("l jS \of F Y h:i:s A", $data['TimeStamp']);
+ $arr = [];
+ print_r($data);
+ $CO = is_nan($aqi->calculateAQI("Co", $data['Co'], $tableObj)) ? 0 : $aqi->calculateAQI("Co", $data['Co'], $tableObj);
+ $SO = is_nan($aqi->calculateAQI("So", $data['So'], $tableObj)) ? 0 : $aqi->calculateAQI("So", $data['So'], $tableObj);
+ $NO = is_nan($aqi->calculateAQI("No", $data['No'], $tableObj)) ? 0 : $aqi->calculateAQI("No", $data['No'], $tableObj);
+
+ array_push($arr, $CO, $SO, $NO);
+ $max = max($arr);
+ $data['Aqi'] = $max;
+
- return $this->render('default/index.html.twig',$data);
+ return $this->render('default/index.html.twig', $data);
}
}
diff --git a/src/AppBundle/Utils/Aqi.php b/src/AppBundle/Utils/Aqi.php
new file mode 100644
index 0000000..6451c77
--- /dev/null
+++ b/src/AppBundle/Utils/Aqi.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: andy
+ * Date: 11/30/17
+ * Time: 11:27 AM
+ *
+ *
+ */
+
+Namespace AppBundle\Utils;
+
+class Aqi {
+ public function calculateAQI($gasName, $concentration, $table) {
+ $bpLow = 1;
+ $bpHi = 2;
+ $bpLowIndex = 1;
+ $bpHiIndex = 1;
+
+ $arr = $table ->{$gasName} ->{'breakpoints'};
+ foreach ($arr as $index => $value) {
+ if ($value < $concentration && $table->{$gasName}->{'breakpoints'}[$index + 1] > $concentration) {
+ $bpLow = $value;
+ $bpLowIndex = $index;
+ }
+
+ if ($value > $concentration && $table->{$gasName}->{'breakpoints'}[$index - 1] < $concentration) {
+ $bpHi = $value;
+ $bpHiIndex = $index;
+ }
+
+ };
+
+
+
+ $airQualityIndex = (($table->{$gasName}->{'aq'}[$bpHiIndex] - $table->{$gasName}->{'aq'}[$bpLowIndex]) / ($bpHi - $bpLow)) * ($concentration - $bpLow) + $table->{$gasName}->{'aq'}[$bpLowIndex];
+
+ return $airQualityIndex;
+
+ }
+}
+
+?> \ No newline at end of file