Actions

API17

Difference between revisions of "JRequest::getVar"

From Joomla! Documentation

(Layout updates)
m (User contributed notes: added example)
(One intermediate revision by one user not shown)
Line 8: Line 8:
 
<nowiki>[</nowiki>[[Description:JRequest::getVar|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JRequest::getVar|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JRequest::getVar ($name, $default=null, $hash= 'default', $type= 'none', $mask=0)
+
public static function getVar (
 +
        $name
 +
        $default=null
 +
        $hash= 'default'
 +
        $type= 'none'
 +
        $mask=0
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 45: Line 50:
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns'''
 
+
* '''Defined''' on line 92 of libraries/joomla/environment/request.php
===Defined in===
+
* '''Referenced by'''
libraries/joomla/environment/request.php (line 91)
+
** [[JSession::_start/11.1|JSession::_start]]
* see source code in [[jplatform:environment/request.php#cl-91|BitBucket]]
+
** [[JControllerAdmin::checkin/11.1|JControllerAdmin::checkin]]
===Referenced by===
+
** [[JControllerAdmin::delete/11.1|JControllerAdmin::delete]]
* [[JSession::_start/11.1|JSession::_start]]
+
** [[JControllerForm::edit/11.1|JControllerForm::edit]]
* [[JControllerAdmin::checkin/11.1|JControllerAdmin::checkin]]
+
** [[JController::getInstance/11.1|JController::getInstance]]
* [[JControllerAdmin::delete/11.1|JControllerAdmin::delete]]
+
** [[JModelList::getUserStateFromRequest/11.1|JModelList::getUserStateFromRequest]]
* [[JControllerForm::edit/11.1|JControllerForm::edit]]
+
** [[JCache::makeId/11.1|JCache::makeId]]
* [[JController::getInstance/11.1|JController::getInstance]]
+
** [[JControllerAdmin::publish/11.1|JControllerAdmin::publish]]
* [[JModelList::getUserStateFromRequest/11.1|JModelList::getUserStateFromRequest]]
+
** [[JControllerAdmin::reorder/11.1|JControllerAdmin::reorder]]
* [[JCache::makeId/11.1|JCache::makeId]]
+
** [[JControllerForm::save/11.1|JControllerForm::save]]
* [[JControllerAdmin::publish/11.1|JControllerAdmin::publish]]
+
** [[JControllerAdmin::saveorder/11.1|JControllerAdmin::saveorder]]
* [[JControllerAdmin::reorder/11.1|JControllerAdmin::reorder]]
+
* [[JControllerForm::save/11.1|JControllerForm::save]]
+
* [[JControllerAdmin::saveorder/11.1|JControllerAdmin::saveorder]]
+
 
===See also===
 
===See also===
 +
* {{JVer|11.1}} '''JRequest::getVar source code''' on [[jplatform:environment/request.php#cl-84|BitBucket]]
 +
* {{JVer|11.1}} Class [[JRequest/11.1|JRequest]]
 +
* {{JVer|11.1}} Subpackage [[Subpackage_Environment/11.1|Environment]]
 +
* [[JRequest::getVar|Other versions of JRequest::getVar]]
 +
{{SeeAlso:JRequest::getVar}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JRequest::getVar|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JRequest::getVar|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
* [[JRequest/11.1|JRequest]]
+
===User contributed notes===
* [[JRequest::getVar|Other versions of this method]]
+
===Example===
{{SeeAlso:JRequest::getVar}}
+
<source lang="php">
===Examples===
+
//Retrieve file details from uploaded file, sent from upload form
 +
$file = JRequest::getVar('upload_file', null, 'files', 'array');
 +
</source>
 +
 
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 77: Line 87:
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:JRequest]][[Category:JRequest::getVar]]</noinclude>
 
<noinclude>[[Category:JRequest]][[Category:JRequest::getVar]]</noinclude>

Revision as of 04:12, 1 July 2012

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.

Joomla 11.1 JRequest::getVar

Description

Fetches and returns a given variable.

Description:JRequest::getVar [Edit Descripton]

public static function getVar (
        $name
        $default=null
        $hash= 'default'
        $type= 'none'
        $mask=0
)
Parameter Type Default Description
$name
$default null
$hash 'default'
$type 'none'
$mask 0

See also

SeeAlso:JRequest::getVar [Edit See Also]

User contributed notes

Example

//Retrieve file details from uploaded file, sent from upload form
$file = JRequest::getVar('upload_file', null, 'files', 'array');

<CodeExamplesForm />