<commit_before><?php
/** 
 * MINZ - Copyright 2011 <NAME>
 * Sous licence AGPL3 <http://www.gnu.org/licenses/>
*/

/**
 * Request représente la requête http
 */
class Request {
	private static $controller_name = '';
	private static $action_name = '';
	private static $params = array ();
	
	private static $default_controller_name = 'index';
	private static $default_action_name = 'index';
	
	public static $reseted = true;
	
	/**
	 * Getteurs
	 */
	public static function controllerName () {
		return self::$controller_name;
	}
	public static function actionName () {
		return self::$action_name;
	}
	public static function params () {
		return self::$params;
	}
	public static function param ($key, $default = false, $specialchars = false) {
		if (isset (self::$params[$key])) {
			$p = self::$params[$key];
			if(is_object($p) || $specialchars) {
				return $p;
			} elseif(is_array($p)) {
				return array_map('htmlspecialchars', $p, ENT_NOQUOTES, 'UTF-8');
			} else {
				return htmlspecialchars($p, ENT_NOQUOTES, 'UTF-8');
			}
		} else {<commit_msg>Revert wrong change on array_map<commit_after><?php
/** 
 * MINZ - Copyright 2011 <NAME>
 * Sous licence AGPL3 <http://www.gnu.org/licenses/>
*/

/**
 * Request représente la requête http
 */
class Request {
	private static $controller_name = '';
	private static $action_name = '';
	private static $params = array ();
	
	private static $default_controller_name = 'index';
	private static $default_action_name = 'index';
	
	public static $reseted = true;
	
	/**
	 * Getteurs
	 */
	public static function controllerName () {
		return self::$controller_name;
	}
	public static function actionName () {
		return self::$action_name;
	}
	public static function params () {
		return self::$params;
	}
	public static function param ($key, $default = false, $specialchars = false) {
		if (isset (self::$params[$key])) {
			$p = self::$params[$key];
			if(is_object($p) || $specialchars) {
				return $p;
			} elseif(is_array($p)) {
				return array_map('htmlspecialchars', $p);	//TODO: Should use explicit UTF-8
			} else {
				return htmlspecialchars($p, ENT_NOQUOTES, 'UTF-8');
			}
		} else {
{'fraction_non_alphanumeric': 0.15172735760971054, 'fraction_numerical': 0.006535947712418301, 'mean_word_length': 3.9377880184331797, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6571634', 'n_tokens_mistral': 760, 'n_tokens_neox': 696, 'n_words': 181}