mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 16:42:33 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			523 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			523 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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;
 | 
						|
		}
 | 
						|
	}
 | 
						|
} |