mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-25 06:22:20 +00:00
5c88ccb91a
Les Correspondances peuvent démarrer :)
54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?php
|
|
|
|
class SchoolClass
|
|
{
|
|
const SECONDE = 0;
|
|
const PREMIERE = 1;
|
|
const TERMINALE = 2;
|
|
const ADULT = 3;
|
|
|
|
public static function getTranslatedName($class) {
|
|
switch ($class) {
|
|
case self::SECONDE:
|
|
return "Seconde ou inférieur";
|
|
case self::PREMIERE:
|
|
return "Première";
|
|
case self::TERMINALE:
|
|
return "Terminale";
|
|
case self::ADULT:
|
|
return "Adulte";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static function getName($class) {
|
|
switch ($class) {
|
|
case self::SECONDE:
|
|
return "SECONDE";
|
|
case self::PREMIERE:
|
|
return "PREMIERE";
|
|
case self::TERMINALE:
|
|
return "TERMINALE";
|
|
case self::ADULT:
|
|
return "ADULT";
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static function fromName($name) {
|
|
switch ($name) {
|
|
case "SECONDE":
|
|
return self::SECONDE;
|
|
case "PREMIERE":
|
|
return self::PREMIERE;
|
|
case "TERMINALE":
|
|
return self::TERMINALE;
|
|
case "ADULT":
|
|
return self::ADULT;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
} |