1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-13 20:46:53 +00:00
plateforme-corres2math/server_files/classes/SchoolClass.php

41 lines
713 B
PHP
Raw Normal View History

<?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;
}
}
}