You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sae_2a_anglais/Project/php/model/MdlTeacher.php

41 lines
811 B

<?php
namespace model;
use gateway\UserGateway;
use gateway\VocabularyGateway;
class MdlTeacher extends AbsModel
{
public function __construct()
{
parent::__construct("teacher");
}
public function getAll():array{
$gtw = new VocabularyGateway();
return $gtw->findAll();
}
public function getAllStudent():array {
$gtw = new UserGateway();
return $gtw->findAll();
}
public function getVocabByName(string $name):array{
$gtw = new VocabularyGateway();
$res = $gtw->findByName($name);
return $res;
}
public function RemoveVocById(int $id):void{
$gtw = new VocabularyGateway();
$res = $gtw->remove($id);
}
public function is()
{
// TODO: Implement is() method.
}
}