<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
/**
* Retrieve a value from the request (GET/POST/REQUEST)
*
- * @param $name name of the variable to be retrieved
- * @param $type type of the variable (see CRM_Utils_Type for details)
- * @param $store session scope where variable is stored
- * @param $abort is this variable required
- * @param $default default value of the variable if not present
- * @param $method where should we look for the variable
+ * @param string $name name of the variable to be retrieved
+ * @param string $type type of the variable (see CRM_Utils_Type for details)
+ * @param stdClass $store session scope where variable is stored
+ * @param bool $abort is this variable required
+ * @param mixed $default default value of the variable if not present
+ * @param string $method where should we look for the variable
*
* @return mixed the value of the variable
* @access public
* @static
- *
*/
static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $default = NULL, $method = 'REQUEST') {
return $value;
}
+
+ /**
+ * This is a replacement for $_REQUEST which includes $_GET/$_POST
+ * but excludes $_COOKIE / $_ENV / $_SERVER.
+ *
+ * @internal param string $method
+ * @return array
+ */
+ static function exportValues() {
+ // For more discussion of default $_REQUEST handling, see:
+ // http://www.php.net/manual/en/reserved.variables.request.php
+ // http://www.php.net/manual/en/ini.core.php#ini.request-order
+ // http://www.php.net/manual/en/ini.core.php#ini.variables-order
+
+ $result = array();
+ if ($_GET) {
+ $result = array_merge($result, $_GET);
+ }
+ if ($_POST) {
+ $result = array_merge($result, $_POST);
+ }
+ return $result;
+ }
}