API16

JRequest/getWord

From Joomla! Documentation

< API16:JRequest
Revision as of 17:46, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Fetches and returns a given filtered variable. The word filter only allows the characters [A-Za-z_]. This is currently only a proxy function for getVar(). <span class=...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "API16" 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]

Fetches and returns a given filtered variable. The word filter only allows the characters [A-Za-z_]. This is currently only a proxy function for getVar().

[Edit Descripton]

Template:Description:JRequest/getWord

Syntax[edit]

static getWord($name, $default= '', $hash= 'default')
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).

Returns[edit]

string Requested variable.

Defined in[edit]

libraries/joomla/environment/request.php

Importing[edit]

jimport( 'joomla.environment.request' );

Source Body[edit]

public static function getWord($name, $default = '', $hash = 'default')
{
        return self::getVar($name, $default, $hash, 'word');
}

[Edit See Also] Template:SeeAlso:JRequest/getWord

Examples[edit]

<CodeExamplesForm />