28 lines
482 B
PHP
28 lines
482 B
PHP
<?php
|
|
|
|
namespace App\Timetable;
|
|
|
|
use \PDO;
|
|
|
|
class TimeMapper
|
|
{
|
|
public PDO $dbh;
|
|
|
|
public function __construct(PDO $dbh)
|
|
{
|
|
$this->dbh = $dbh;
|
|
}
|
|
|
|
private function mapRowToTeam(array $row): Time
|
|
{
|
|
$team = new Time();
|
|
return $team;
|
|
}
|
|
|
|
public function create(Time $time): Time
|
|
{
|
|
$sth = $this->dbh->prepare('INSERT INTO tidtabell (LagID) VALUES (?)');
|
|
$sth->execute([$time->teamId]);
|
|
return TRUE;
|
|
}
|
|
} |