42 lines
670 B
PHP
42 lines
670 B
PHP
<?php
|
|
//Erstellt durch Stefan Groß - Getestet von Samuel Wolff
|
|
namespace ppb\Controller;
|
|
|
|
use ppb\Model\GibtsAmModel;
|
|
|
|
class GibtsAmController
|
|
{
|
|
private $db;
|
|
|
|
public function __construct()
|
|
{
|
|
|
|
$this->db = new GibtsAmModel();
|
|
|
|
|
|
}
|
|
|
|
public function getGibtsAm()
|
|
{
|
|
$result = $this->db->selectGibtsAm();
|
|
|
|
return json_encode($result);
|
|
}
|
|
|
|
public function writeGibtsAm($data)
|
|
{
|
|
$result = $this->db->insertGibtsAm($data);
|
|
|
|
return json_encode($result);
|
|
}
|
|
|
|
public function deleteGibtsAm($id)
|
|
{
|
|
$result = $this->db->deleteGibtsAm($id);
|
|
|
|
return json_encode($result);
|
|
}
|
|
}
|
|
|
|
|
|
?>
|