php
parent
6ef11e5afa
commit
e369db326b
@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace model;
|
||||
|
||||
class Student extends User
|
||||
{
|
||||
public string $nickname;
|
||||
private bool $extraTime;
|
||||
|
||||
/**
|
||||
* @param String $nickname
|
||||
* @param bool $extraTime
|
||||
*/
|
||||
public function __construct(string $id, string $mail, string $name, string $surname, string $nickname, bool $extraTime)
|
||||
{
|
||||
parent::__construct($id, $mail, $name, $surname);
|
||||
$this->nickname = $nickname;
|
||||
$this->extraTime = $extraTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isExtraTime(): bool
|
||||
{
|
||||
return $this->extraTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $extraTime
|
||||
*/
|
||||
public function setExtraTime(bool $extraTime): void
|
||||
{
|
||||
$this->extraTime = $extraTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param String $nickname
|
||||
*/
|
||||
public function setNickname(string $nickname): void
|
||||
{
|
||||
$this->nickname = $nickname;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return "Student : ".parent::__toString()." ".$this->nickname." ".$this->extraTime;
|
||||
}
|
||||
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace model;
|
||||
require_once("User.php");
|
||||
|
||||
class Teacher extends User
|
||||
{
|
||||
protected array $vocab;
|
||||
|
||||
public function __construct(int $id, string $mail, string $name, string $surname, array $vocab) {
|
||||
parent::__construct($id, $mail, $name, $surname);
|
||||
$this->vocab = $vocab;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getVocab(): array
|
||||
{
|
||||
return $this->vocab;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $vocab
|
||||
*/
|
||||
public function setVocab(array $vocab): void
|
||||
{
|
||||
$this->vocab = $vocab;
|
||||
}
|
||||
|
||||
/*
|
||||
public function createVocabulary($array = [], String $name_test, String $url_image){
|
||||
$a = new Vocabulary($array,$name_test,$url_image);
|
||||
$this->vocab[] = $a;
|
||||
return $a;
|
||||
}
|
||||
|
||||
protected function deleteVocabulary(Vocabulary $a){
|
||||
foreach($this->vocab as $r){
|
||||
if($r == $a) unset($this->vocab[$r]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
Loading…
Reference in new issue