/** * Sets the Server Request Parameters * * Singleton-ish implementation * We should only write theese values once * * @param array $server - $_SERVER * @param array $get - $_GET * @param array $post - $_POST * @return bool */ public static function setRequestData($server, $get, $post) { // this could also have an exception thrown // but calling a function that only checks a value and returns false is harmless (and costless) if (self::$_isDataSet != true) { self::$_server = $server; self::$_get = $get; self::$_post = $post; self::$_isDataSet = true; return true; } return false; }