src/Request.php
public static function getArgument($key, $default = "default", $regex = ".*") {
		if(self::$arguments === array())
			self::$arguments = array_merge($_GET, $_POST, $_FILES);

		if(isset(self::$arguments[$key])) {
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$arguments[$key]))
				return self::$arguments[$key];

			throw new InvalidRequestArgumentException;
		}

		return $default;
	}
public static function getArgument($key, $default = "default", $regex = ".*") {
		if(self::$arguments === array())
			self::$arguments = array_merge($_GET, $_POST, $_FILES);

		if(isset(self::$arguments[$key])) {
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$arguments[$key]))
				return self::$arguments[$key];

			throw new InvalidRequestArgumentException;
		}

		return $default;
	}
public static function getArgument ( $ key , $ default = "default" , $ regex = ".*" ) { if ( self :: $ arguments === array ( ) ) self :: $ arguments = array_merge ( $ _GET , $ _POST , $ _FILES ) ; if ( isset ( self :: $ arguments [ $ key ] ) ) { if ( $ regex == ".*" || preg_match ( "/^" . $ regex . "$/i" , self :: $ arguments [ $ key ] ) ) return self :: $ arguments [ $ key ] ; throw new InvalidRequestArgumentException ; } return $ default ; }
Get an argument passed to the page

This is used for _GET, _POST and _FILES.

@param  string $key     The key to retrieve
@param  string $default The default value to return if the key was not found
@param  string $regex   The regular expression pattern the key must conform too
@throws InvalidRequestArgumentException The specified key did not conform to the regex.
@return string
Get an argument passed to the page