40 lines
		
	
	
		
			669 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			669 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
// Erstellt durch Stefan Groß - Getestet von Samuel Wolff
 | 
						|
namespace ppb\Controller;
 | 
						|
 | 
						|
use ppb\Model\IstTeilModel;
 | 
						|
 | 
						|
class istTeilController
 | 
						|
{
 | 
						|
    private $db;
 | 
						|
 | 
						|
    public function __construct()
 | 
						|
    {
 | 
						|
 | 
						|
        $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);
 | 
						|
    }
 | 
						|
 | 
						|
    public function deleteIstTeil($id)
 | 
						|
    {
 | 
						|
        $result = $this->db->deleteIstTeil($id);
 | 
						|
 | 
						|
        return json_encode($result);
 | 
						|
    }
 | 
						|
 | 
						|
}
 | 
						|
?>
 |