1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-26 16:47:10 +00:00
plateforme-tfjm2/server_files/classes/SchoolClass.php
2019-09-07 15:52:25 +02:00

41 lines
713 B
PHP

<?php
class SchoolClass
{
const SECONDE = 0;
const PREMIERE = 1;
const TERMINALE = 2;
public static function getTranslatedName($class) {
switch ($class) {
case self::SECONDE:
return "Seconde ou inférieur";
case self::PREMIERE:
return "Première";
default:
return "Terminale";
}
}
public static function getName($class) {
switch ($class) {
case self::SECONDE:
return "SECONDE";
case self::PREMIERE:
return "PREMIERE";
default:
return "TERMINALE";
}
}
public static function fromName($name) {
switch ($name) {
case "SECONDE":
return self::SECONDE;
case "PREMIERE":
return self::PREMIERE;
default:
return self::TERMINALE;
}
}
}