Actions

API15

JRequest/getString

From Joomla! Documentation

< API15:JRequest
Revision as of 17:19, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Fetches and returns a given filtered variable. The string filter deletes 'bad' HTML code, if not overridden by the mask. This is currently only a proxy function for getVar().

[Edit Descripton]

Description:JRequest/getString

Syntax

getString($name, $default= '', $hash= 'default', $mask=0)
Parameter Name Default Value Description
$name $name Variable name
$default $default Default value if the variable does not exist
$hash 'default' $hash Where the var should come from (POST, GET, FILES, COOKIE, METHOD)
$mask 0 $mask Filter mask for the variable

Returns

string Requested variable

Defined in

libraries/joomla/environment/request.php

Importing

jimport( 'joomla.environment.request' );

Source Body

function getString($name, $default = '', $hash = 'default', $mask = 0)
{
        // Cast to string, in case JREQUEST_ALLOWRAW was specified for mask
        return (string) JRequest::getVar($name, $default, $hash, 'string', $mask);
}

[Edit See Also] SeeAlso:JRequest/getString

Examples

<CodeExamplesForm />