From a1d1123894d238faa86a3bca80f899f0fb7318b9 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 30 Mar 2022 19:42:50 +0000 Subject: [PATCH] Commit --- app/lib/App/Core/Database.php | 2 +- app/model/{Cardreader.php => BatonReader.php} | 2 +- public/race/simulator.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/model/{Cardreader.php => BatonReader.php} (99%) diff --git a/app/lib/App/Core/Database.php b/app/lib/App/Core/Database.php index 05abe0a..224ac35 100644 --- a/app/lib/App/Core/Database.php +++ b/app/lib/App/Core/Database.php @@ -8,7 +8,7 @@ use \PDOException; /** * Encapsulates a single connection to a database. - * TODO: add different driver implementations. + * TODO: ... */ class Database { diff --git a/app/model/Cardreader.php b/app/model/BatonReader.php similarity index 99% rename from app/model/Cardreader.php rename to app/model/BatonReader.php index 12763d9..1e440cf 100644 --- a/app/model/Cardreader.php +++ b/app/model/BatonReader.php @@ -6,7 +6,7 @@ use App\Teamtable\TeamMapper; use App\Timetable\Time; use App\Timetable\TimeMapper; -class Cardreader +class BatonReader { public PDO $dbh; diff --git a/public/race/simulator.php b/public/race/simulator.php index 4174d0c..efebf10 100644 --- a/public/race/simulator.php +++ b/public/race/simulator.php @@ -2,7 +2,7 @@ // uh oh.. stinky -$cardreader = $app->model('Cardreader'); +$batonReader = $app->model('BatonReader'); if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -11,7 +11,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') $cardnumber = (string)$_POST['cardnumber']; try { - $code = $cardreader->receive($cardnumber, 5); + $code = $batonReader->receive($cardnumber, 5); switch ($code) { case 0: $app->session->flash('Opprettet nytt lag', 'success');