plateforme-corres2math/server_files/classes/Reason.php

35 lines
523 B
PHP
Raw Normal View History

2019-09-16 22:04:45 +00:00
<?php
class Reason
{
const SOLUTION = 0;
const ANSWER = 1;
public static function getTranslatedName($class) {
switch ($class) {
case self::ANSWER:
return "Réponse";
default:
return "Solution";
}
}
public static function getName($class) {
switch ($class) {
case self::ANSWER:
return "ANSWER";
default:
return "SOLUTION";
}
}
public static function fromName($name) {
switch ($name) {
case "ANSWER":
return self::ANSWER;
default:
return self::SOLUTION;
}
}
}