Merge Konflikte bereinigt
This commit is contained in:
@@ -8,30 +8,34 @@ namespace ppb\Controller;
|
||||
use ppb\Library\Msg;
|
||||
use ppb\Model\BenutzerModel;
|
||||
|
||||
class BenutzerController{
|
||||
class BenutzerController
|
||||
{
|
||||
|
||||
private $db;
|
||||
|
||||
public function __construct(){
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = new BenutzerModel();
|
||||
}
|
||||
|
||||
// Updated einen Benutzer
|
||||
public function updateBenutzer($elternId, $data){
|
||||
public function updateBenutzer($elternId, $data)
|
||||
{
|
||||
|
||||
$result = $this->db->updateBenutzer($benutzerId, $data);
|
||||
$result = $this->db->updateBenutzer($elternId, $data);
|
||||
|
||||
return json_encode($result);
|
||||
|
||||
}
|
||||
|
||||
// Fügt einen Benutzer in die Datenbank hinzu
|
||||
public function insertBenutzer($data){
|
||||
$result = $this->db->insertBenutzer($data)
|
||||
public function writeBenutzer($data)
|
||||
{
|
||||
$result = $this->db->insertBenutzer($data);
|
||||
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
@@ -7,38 +7,44 @@ namespace ppb\Controller;
|
||||
use ppb\Library\Msg;
|
||||
use ppb\Model\BestellungModel;
|
||||
|
||||
class BestellungController {
|
||||
|
||||
private $db;
|
||||
|
||||
public function __construct() {
|
||||
$this->db = new BestellungModel();
|
||||
class BestellungController
|
||||
{
|
||||
|
||||
private $db;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = new BestellungModel();
|
||||
}
|
||||
|
||||
public function getBestellung($id = false)
|
||||
{
|
||||
$result = $this->db->selectBestellung($id);
|
||||
if ($id !== false) {
|
||||
if ($result)
|
||||
$result = $result[0];
|
||||
else
|
||||
$result = false;
|
||||
}
|
||||
|
||||
public function getBestellung($id=false) {
|
||||
$result=$this->db->selectBestellung($id);
|
||||
if($id !== false){
|
||||
if($result)
|
||||
$result=$result[0];
|
||||
else
|
||||
$result=false;
|
||||
}
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function writeBestellung($data){
|
||||
$result=$this->db->insertGericht($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
public function writeBestellung($data)
|
||||
{
|
||||
$result = $this->db->insertBestellung($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function updateBestellung($id, $data){
|
||||
$result=$this->db->updateBestellung($id, $data);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function deleteBestellung($id){
|
||||
$result=$this->db->deleteBestellung($id);
|
||||
return json_encode($result);
|
||||
}
|
||||
public function updateBestellung($id, $data)
|
||||
{
|
||||
$result = $this->db->updateBestellung($id, $data);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function deleteBestellung($id)
|
||||
{
|
||||
$result = $this->db->deleteBestellung($id);
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
@@ -1,25 +1,31 @@
|
||||
<?php
|
||||
//Programmiert von: Max Heer, Getestet von:
|
||||
//Programmiert von: Max Heer, Getestet von: Samuel Wolff
|
||||
|
||||
namespace VPR_Schnittstelle\Controller;
|
||||
namespace ppb\Controller;
|
||||
|
||||
use VPR_Schnittstelle\Libary\Msg;
|
||||
use VPR_Schnittstelle\Model\EnthaeltModel;
|
||||
use ppb\Libary\Msg;
|
||||
use ppb\Model\EnthaeltModel;
|
||||
|
||||
class EnthaeltController(){
|
||||
public function getInhaltsstoffe($gerichtId){
|
||||
$result=$this->db->getEnthaelt($gerichtId);
|
||||
return json_encode($result);
|
||||
}
|
||||
class EnthaeltController
|
||||
{
|
||||
|
||||
public function insertEnthaelt($data){
|
||||
$result=$this->db->insertEnthaelt($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
private $db;
|
||||
|
||||
public function deleteEnthaelt($id){
|
||||
$result=$this->db->deleteEnthaelt($id);
|
||||
return json_encode($result);
|
||||
}
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = new EnthaeltModel();
|
||||
}
|
||||
|
||||
public function getEnthaelt($gerichtId)
|
||||
{
|
||||
$result = $this->db->getEnthaelt($gerichtId);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function writeEnthaelt($data)
|
||||
{
|
||||
$result = $this->db->insertEnthaelt($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,23 +1,38 @@
|
||||
<?php
|
||||
//Programmiert von: Max Heer, Getestet von:
|
||||
//Programmiert von: Max Heer, Getestet von:
|
||||
|
||||
namespace VPR_Schnittstelle\Controller;
|
||||
namespace ppb\Controller;
|
||||
|
||||
use VPR_Schnittstelle\Libary\Msg;
|
||||
use VPR_Schnittstelle\Model\InhaltsstoffModel;
|
||||
use ppb\Libary\Msg;
|
||||
use ppb\Model\InhaltsstoffModel;
|
||||
|
||||
public function getInhaltsstoff(){
|
||||
$result=$this->db->getInhaltsstoff();
|
||||
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);
|
||||
public function writeInhaltsstoff($data)
|
||||
{
|
||||
$result = $this->db->insertInhaltsstoff($data);
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function deleteInhaltsstoff($id){
|
||||
$result=$this->db->deleteInhaltsstoff($id);
|
||||
public function deleteInhaltsstoff($id)
|
||||
{
|
||||
$result = $this->db->deleteInhaltsstoff($id);
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,45 +1,51 @@
|
||||
<?php
|
||||
|
||||
// Programmiert durch Samuel Wolff
|
||||
// Getestet durch: Nicht getestet
|
||||
// Getestet durch: Samuel Wolff
|
||||
|
||||
namespace ppb\Controller;
|
||||
|
||||
use ppb\Library\Msg;
|
||||
use ppb\Model\KindModel;
|
||||
|
||||
class KindController{
|
||||
class KindController
|
||||
{
|
||||
|
||||
private $db;
|
||||
|
||||
public function __construct(){
|
||||
public function __construct()
|
||||
{
|
||||
$this->db = new KindModel();
|
||||
}
|
||||
|
||||
// $parentId ist standardmäßig auf false und gibt damit alle Kinder aus,
|
||||
// das setzen gibt nur Kinder eines bestimmten Benutzerkontos aus.
|
||||
public function getKind($parentId = false){
|
||||
public function getKind($parentId = false)
|
||||
{
|
||||
$result = $this->db->getKind($parentId);
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
// Updated ein Kind
|
||||
public function updateKind($kindId, $data){
|
||||
public function updateKind($kindId, $data)
|
||||
{
|
||||
$result = $this->db->updateKind($kindId, $data);
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
// Fügt ein Kind hinzu
|
||||
public function addKind($data){
|
||||
public function writeKind($data)
|
||||
{
|
||||
$result = $this->db->addKind($data);
|
||||
|
||||
return json_encode($data);
|
||||
}
|
||||
|
||||
// Löscht ein Kind
|
||||
public function deleteKind($kindId){
|
||||
public function deleteKind($kindId)
|
||||
{
|
||||
$result = $this->db->deleteKind($kindId);
|
||||
|
||||
return $result;
|
||||
|
@@ -1,21 +1,40 @@
|
||||
<?php
|
||||
// Erstellt durch Stefan Groß
|
||||
namespace kinderverwaltung\Controller;
|
||||
// Erstellt durch Stefan Groß - Nicht getestet
|
||||
namespace ppb\Controller;
|
||||
|
||||
class istTeilController {
|
||||
use ppb\Model\IstTeilModel;
|
||||
|
||||
class istTeilController
|
||||
{
|
||||
private $db;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this-> db = new istTeilModel();
|
||||
|
||||
$this->db = new istTeilModel();
|
||||
|
||||
}
|
||||
|
||||
public function getBestellung(){
|
||||
$result = $this->db->getBestellung();
|
||||
public function getIstTeil()
|
||||
{
|
||||
$result = $this->db->selectIstTeil();
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function writeIstTeil($data)
|
||||
{
|
||||
$result = $this->db->insertIstTeil($data);
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function deleteIstTeil($id)
|
||||
{
|
||||
$result = $this->db->deleteIstTeil($id);
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
Reference in New Issue
Block a user