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.
45 lines
1002 B
45 lines
1002 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();
|
|
/*
|
|
foreach ($data as $row){
|
|
$AllStudent[] = User($row['id'],$row['password'],$row['email'],$row['name'],$row['surname'],$row['nickname'],$row['image'],$row['extraTime'],$row['group'],$row['roles']);
|
|
}
|
|
return $AllStudent;
|
|
*/
|
|
}
|
|
|
|
public function getAllStudent():array {
|
|
$gtw = new UserGateway();
|
|
return $gtw->findAll();
|
|
}
|
|
|
|
public function getVocabByName($name):array{
|
|
$gtw = new VocabularyGateway();
|
|
$res = $gtw->findByName($name);
|
|
return $res;
|
|
}
|
|
|
|
public function RemoveVocById($id):void{
|
|
$gtw = new VocabularyGateway();
|
|
$res = $gtw->remove($id);
|
|
}
|
|
|
|
|
|
|
|
|
|
} |