mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-27 15:33:02 +00:00
41 lines
713 B
PHP
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;
|
||
|
}
|
||
|
}
|
||
|
}
|