Actions

API15

JRequest/getCmd

From Joomla! Documentation

< API15:JRequest
Revision as of 12:44, 12 May 2013 by JoomlaWikiBot (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 cmd filter only allows the characters [A-Za-z0-9.-_]. This is currently only a proxy function for getVar().

[<! removed edit link to red link >]

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

Syntax

getCmd($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

string Requested variable

Defined in

libraries/joomla/environment/request.php

Importing

jimport( 'joomla.environment.request' );

Source Body

function getCmd($name, $default = '', $hash = 'default')
{
        return JRequest::getVar($name, $default, $hash, 'cmd');
}

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

Examples

<CodeExamplesForm />