38 lines
715 B
PHP
38 lines
715 B
PHP
<?php
|
|
//Programmiert von: Max Heer, Getestet von:
|
|
|
|
namespace ppb\Controller;
|
|
|
|
use ppb\Libary\Msg;
|
|
use ppb\Model\InhaltsstoffModel;
|
|
|
|
class InhaltsstoffController
|
|
{
|
|
|
|
private $db;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->db = new InhaltsstoffModel();
|
|
}
|
|
|
|
|
|
public function getInhaltsstoff()
|
|
{
|
|
$result = $this->db->getInhaltsstoff();
|
|
return json_encode($result);
|
|
}
|
|
|
|
public function insertInhaltsstoff($data)
|
|
{
|
|
$result = $this->db->insertInhaltsstoff($data);
|
|
return json_encode($result);
|
|
}
|
|
|
|
public function deleteInhaltsstoff($id)
|
|
{
|
|
$result = $this->db->deleteInhaltsstoff($id);
|
|
return json_encode($result);
|
|
}
|
|
}
|
|
?>
|