Difference between revisions of "JRequest::getVar"
From Joomla! Documentation
(Updated to r1448:247ba8d88526) |
m (preparing for archive only) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
Fetches and returns a given variable. | Fetches and returns a given variable. | ||
− | + | ||
− | + | ||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
public static function getVar ( | public static function getVar ( | ||
Line 53: | Line 51: | ||
* '''Defined''' on line 92 of libraries/joomla/environment/request.php | * '''Defined''' on line 92 of libraries/joomla/environment/request.php | ||
* '''Referenced by''' | * '''Referenced by''' | ||
− | ** [[JSession::_start | + | ** [[API17:JSession::_start|JSession::_start]] |
− | ** [[JControllerAdmin::checkin | + | ** [[API17:JControllerAdmin::checkin|JControllerAdmin::checkin]] |
− | ** [[JControllerAdmin::delete | + | ** [[API17:JControllerAdmin::delete|JControllerAdmin::delete]] |
− | ** [[JControllerForm::edit | + | ** [[API17:JControllerForm::edit|JControllerForm::edit]] |
− | ** [[JController::getInstance | + | ** [[API17:JController::getInstance|JController::getInstance]] |
− | ** [[JModelList::getUserStateFromRequest | + | ** [[API17:JModelList::getUserStateFromRequest|JModelList::getUserStateFromRequest]] |
− | ** [[JCache::makeId | + | ** [[API17:JCache::makeId|JCache::makeId]] |
− | ** [[JControllerAdmin::publish | + | ** [[API17:JControllerAdmin::publish|JControllerAdmin::publish]] |
− | ** [[JControllerAdmin::reorder | + | ** [[API17:JControllerAdmin::reorder|JControllerAdmin::reorder]] |
− | ** [[JControllerForm::save | + | ** [[API17:JControllerForm::save|JControllerForm::save]] |
− | ** [[JControllerAdmin::saveorder | + | ** [[API17:JControllerAdmin::saveorder|JControllerAdmin::saveorder]] |
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JRequest::getVar source code''' on [[jplatform:environment/request.php#cl-84|BitBucket]] | * {{JVer|11.1}} '''JRequest::getVar source code''' on [[jplatform:environment/request.php#cl-84|BitBucket]] | ||
− | * {{JVer|11.1}} Class [[JRequest | + | * {{JVer|11.1}} Class [[API17:JRequest|JRequest]] |
− | * {{JVer|11.1}} Subpackage [[Subpackage_Environment | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Environment|Environment]] |
− | * [[JRequest::getVar|Other versions of JRequest::getVar]] | + | * [[API17:JRequest::getVar|Other versions of JRequest::getVar]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | < | + | ===Example=== |
+ | <source lang="php"> | ||
+ | //Retrieve file details from uploaded file, sent from upload form | ||
+ | $file = JRequest::getVar('upload_file', null, 'files', 'array'); | ||
+ | </source> | ||
+ | |||
+ | === Code Examples === | ||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JRequest::getVar | category=JRequest::getVar | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Line 84: | Line 86: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude>[[Category: | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:36, 24 March 2017
The "API17" 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.
JRequest::getVar[edit]
Description[edit]
Fetches and returns a given variable.
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 |
- Returns
- Defined on line 92 of libraries/joomla/environment/request.php
- Referenced by
See also[edit]
- JRequest::getVar source code on BitBucket
- Class JRequest
- Subpackage Environment
- Other versions of JRequest::getVar
User contributed notes[edit]
Example[edit]
//Retrieve file details from uploaded file, sent from upload form
$file = JRequest::getVar('upload_file', null, 'files', 'array');
Code Examples[edit]