31 lines
		
	
	
		
			569 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			569 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
//Programmiert von: Max Heer, Getestet von: Samuel Wolff
 | 
						|
 | 
						|
namespace ppb\Controller;
 | 
						|
 | 
						|
use ppb\Libary\Msg;
 | 
						|
use ppb\Model\EnthaeltModel;
 | 
						|
 | 
						|
class EnthaeltController
 | 
						|
{
 | 
						|
 | 
						|
    private $db;
 | 
						|
 | 
						|
    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);
 | 
						|
    }
 | 
						|
}
 | 
						|
?>
 |