VPR_Schnittstelle/Controller/istTeilController.php

40 lines
669 B
PHP
Raw Normal View History

2023-12-06 08:57:17 +01:00
<?php
// Erstellt durch Stefan Groß - Getestet von Samuel Wolff
2024-01-14 17:51:11 +01:00
namespace ppb\Controller;
2023-12-06 08:57:17 +01:00
2024-01-14 17:51:11 +01:00
use ppb\Model\IstTeilModel;
class istTeilController
{
2023-12-06 08:57:17 +01:00
private $db;
public function __construct()
{
2024-01-14 17:51:11 +01:00
$this->db = new istTeilModel();
}
public function getIstTeil()
{
$result = $this->db->selectIstTeil();
return json_encode($result);
}
public function writeIstTeil($data)
{
$result = $this->db->insertIstTeil($data);
return json_encode($result);
2023-12-06 08:57:17 +01:00
}
2024-01-14 17:51:11 +01:00
public function deleteIstTeil($id)
{
$result = $this->db->deleteIstTeil($id);
2023-12-06 08:57:17 +01:00
return json_encode($result);
}
2024-01-14 17:51:11 +01:00
2023-12-06 08:57:17 +01:00
}
2024-01-14 17:51:11 +01:00
?>