Actions

API16

JRequest/getBool

From Joomla! Documentation

< API16:JRequest
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 bool filter will only return true/false bool values. This is currently only a proxy function for getVar().

[Edit Descripton]

Description:JRequest/getBool

Syntax

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

Returns

bool Requested variable.

Defined in

libraries/joomla/environment/request.php

Importing

jimport( 'joomla.environment.request' );

Source Body

public static function getBool($name, $default = false, $hash = 'default')
{
        return self::getVar($name, $default, $hash, 'bool');
}

[Edit See Also] SeeAlso:JRequest/getBool

Examples

<CodeExamplesForm />