Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/inc/lib/request.class.php

36 lines
795 B

<?php
/**
* Description of request
*
* @author Laurent Opprecht <laurent@opprecht.info>
*/
class Request
{
public static function get($key, $default = null)
{
return isset($_GET[$key]) ? isset($_GET[$key]) : $default;
}
public static function post($key, $default = null)
{
return isset($_POST[$key]) ? isset($_POST[$key]) : $default;
}
static function server($key, $default = null)
{
return isset($_SERVER[$key]) ? isset($_SERVER[$key]) : $default;
}
static function file($key, $default = null)
{
return isset($_FILES[$key]) ? isset($_FILES[$key]) : $default;
}
static function environment($key, $default = null)
{
return isset($_ENV[$key]) ? isset($_ENV[$key]) : $default;
}
}