2019-01-13 13:06:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace AirQuality\Actions;
|
|
|
|
|
|
|
|
|
2019-01-14 20:17:36 +00:00
|
|
|
class FetchData {
|
2019-01-13 13:06:32 +00:00
|
|
|
private $settings;
|
2019-01-14 20:41:25 +00:00
|
|
|
private $validator;
|
2019-01-13 13:06:32 +00:00
|
|
|
|
|
|
|
public function __construct(
|
2019-01-14 21:33:30 +00:00
|
|
|
\SBRL\TomlConfig $in_settings) {
|
2019-01-13 13:06:32 +00:00
|
|
|
$this->settings = $in_settings;
|
2019-01-14 20:41:25 +00:00
|
|
|
$this->validator = new \AirQuality\Validator($_GET);
|
2019-01-13 13:06:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function handle() {
|
2019-01-14 20:41:25 +00:00
|
|
|
$this->validator->is_datetime("datetime");
|
|
|
|
$this->validator->run();
|
|
|
|
|
|
|
|
echo("Params valid!");
|
2019-01-13 13:06:32 +00:00
|
|
|
}
|
|
|
|
}
|