VPR_Schnittstelle/Controller/EnthaeltController.php

31 lines
620 B
PHP
Raw Normal View History

2023-12-06 08:53:48 +01:00
<?php
2023-12-18 08:16:21 +01:00
//Programmiert von: Max Heer, Getestet von:
2023-12-06 08:53:48 +01:00
2023-12-18 08:16:21 +01:00
namespace kindergartenverwaltung\Controller;
2023-12-06 08:53:48 +01:00
2023-12-18 08:16:21 +01:00
use kindergartenverwaltung\Libary\Msg;
use kindergartenverwaltung\Model\EnthaeltModel;
2023-12-06 08:53:48 +01:00
2023-12-18 08:16:21 +01:00
class EnthaeltController
{
2023-12-06 08:53:48 +01:00
2023-12-18 08:16:21 +01:00
private $db;
public function __construct()
{
$this->db = new EnthaeltModel();
}
public function getInhaltsstoffe($gerichtId)
{
$result = $this->db->getEnthaelt($gerichtId);
return json_encode($result);
}
public function insertEnthaelt($data)
{
$result = $this->db->insertEnthaelt($data);
return json_encode($result);
2023-12-06 08:53:48 +01:00
}
2023-12-18 08:16:21 +01:00
}
2023-12-06 08:53:48 +01:00
?>