API16

API16:JRequest/getInt

From Joomla! Documentation

Revision as of 22:46, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Fetches and returns a given filtered variable. The integer filter will allow only digits to be returned. This is currently only a proxy function for getVar(). <span cl...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Fetches and returns a given filtered variable. The integer filter will allow only digits to be returned. This is currently only a proxy function for getVar().

[Edit Descripton]

Template:Description:JRequest/getInt

Syntax

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

Returns

integer Requested variable.

Defined in

libraries/joomla/environment/request.php

Importing

jimport( 'joomla.environment.request' );

Source Body

public static function getInt($name, $default = 0, $hash = 'default')
{
        return self::getVar($name, $default, $hash, 'int');
}

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

Examples

<CodeExamplesForm />