API15

JRequest/set

From Joomla! Documentation

< API15:JRequest

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Sets a request variable

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

set($array, $hash= 'default', $overwrite=true)
Parameter Name Default Value Description
$array An associative array of key-value pairs
$hash 'default' The request variable to set (POST, GET, FILES, METHOD)
$overwrite true If true and an existing key is found, the value is overwritten, otherwise it is ingored

Defined in[edit]

libraries/joomla/environment/request.php

Importing[edit]

jimport( 'joomla.environment.request' );

Source Body[edit]

function set( $array, $hash = 'default', $overwrite = true )
{
        foreach ($array as $key => $value) {
                JRequest::setVar($key, $value, $hash, $overwrite);
        }
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

Code Examples[edit]