<?php
/*
 * @component Calc Builder 
 * @copyright Copyright (C) January 2017. 
 * @license GPL 3.0 
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details. 
 * See <http://www.gnu.org/licenses/>. 
 * More info www.moonsoft.es 
 * gestion@moonsoft.es
 */
// No direct access.
defined ( '_JEXEC' ) or die ();
class MSHelper {
	
	// public static function __requestGetVarWrapper($name, $default = null, $hash = 'default', $type = 'string', $mask = 0){
	public static function __requestGetVarWrapper($name, $default = null, $hash = 'default', $type = null, $mask = 0) {
		return JRequest::getVar ( $name, $default, $hash, $type, $mask );		
		 /*$jinput = JFactory::getApplication()->input; 
		 $ctype=$type; 
		 if (intval($mask)==2) $ctype='HTML'; 
		 if($ctype!=null) return $jinput->get($name, $default,$ctype); 
		 else return $jinput->get($name, $default);*/		
	}
	public static function __requestSetVarWrapper($name, $value = null, $hash = 'method', $overwrite = true) {
		$jinput = JFactory::getApplication ()->input;
		$jinput->set ( $name, $value );
	}
	public static function __getEscapedWrapper($text, $extra = false) {
		$db = JFactory::getDBO ();
		return $db->escape ( $text, $extra );
	}
	public static function __getRequest() {
		return JFactory::getApplication ()->input;
	}
}

?>