Don't access the database connection directly in the action - that's bad!

This commit is contained in:
Starbeamrainbowlabs 2019-01-14 21:33:30 +00:00
parent 4ea28cdbff
commit ec8e3363d1
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -8,10 +8,8 @@ class FetchData {
private $validator; private $validator;
public function __construct( public function __construct(
\SBRL\TomlConfig $in_settings, \SBRL\TomlConfig $in_settings) {
\AirQuality\Database $in_database) {
$this->settings = $in_settings; $this->settings = $in_settings;
$this->database = $in_database;
$this->validator = new \AirQuality\Validator($_GET); $this->validator = new \AirQuality\Validator($_GET);
} }