1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-25 06:22:20 +00:00
plateforme-corres2math/server_files/classes/Reason.php
2019-09-24 00:12:33 +02:00

41 lines
662 B
PHP

<?php
class Reason
{
const SOLUTION = 0;
const ANSWER1 = 1;
const ANSWER2 = 2;
public static function getTranslatedName($class) {
switch ($class) {
case self::ANSWER1:
case self::ANSWER2:
return "Réponse";
default:
return "Solution";
}
}
public static function getName($class) {
switch ($class) {
case self::ANSWER1:
return "ANSWER1";
case self::ANSWER2:
return "ANSWER2";
default:
return "SOLUTION";
}
}
public static function fromName($name) {
switch ($name) {
case "ANSWER1":
return self::ANSWER1;
case "ANSWER2":
return self::ANSWER2;
default:
return self::SOLUTION;
}
}
}