webCOMAND

request::set_get()

Set the value that will be returned by get().

Prototype

string set_get(string $key, string $value = NULL)

Parameters

  • key - Name of the parameter to set.
  • value - Optional parameter with the value to set.  If not provided or NULL, the parameter will be unset.

Return

If the GET parameter was set (always TRUE).

Example

// retrieve the value of the "search" GET parameter, then change it
$request = new \io_comand_web\request();
$original_value = $request->get('search');
$request->set_get('search', 'new');
$new_value = $request->get('search');