API17:JRequest::getVar
From Joomla! Documentation
(Difference between revisions)
(Bulk upload by Doxiki2) |
m (→User contributed notes: added example) |
||
| (2 intermediate revisions 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> | ||
| − | |||
<source lang="php"> | <source lang="php"> | ||
| − | public static | + | public static function getVar ( |
| + | $name | ||
| + | $default=null | ||
| + | $hash= 'default' | ||
| + | $type= 'none' | ||
| + | $mask=0 | ||
| + | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
| Line 45: | Line 50: | ||
|- | |- | ||
|} | |} | ||
| − | + | * '''Returns''' | |
| − | + | * '''Defined''' on line 92 of libraries/joomla/environment/request.php | |
| − | + | * '''Referenced by''' | |
| − | libraries/joomla/environment/request.php | + | ** [[JSession::_start/11.1|JSession::_start]] |
| − | + | ** [[JControllerAdmin::checkin/11.1|JControllerAdmin::checkin]] | |
| − | * [[JSession | + | ** [[JControllerAdmin::delete/11.1|JControllerAdmin::delete]] |
| − | * [[JControllerAdmin | + | ** [[JControllerForm::edit/11.1|JControllerForm::edit]] |
| − | * [[JControllerAdmin | + | ** [[JController::getInstance/11.1|JController::getInstance]] |
| − | * [[JControllerForm | + | ** [[JModelList::getUserStateFromRequest/11.1|JModelList::getUserStateFromRequest]] |
| − | * [[JController | + | ** [[JCache::makeId/11.1|JCache::makeId]] |
| − | * [[JModelList | + | ** [[JControllerAdmin::publish/11.1|JControllerAdmin::publish]] |
| − | * [[JCache | + | ** [[JControllerAdmin::reorder/11.1|JControllerAdmin::reorder]] |
| − | * [[JControllerAdmin | + | ** [[JControllerForm::save/11.1|JControllerForm::save]] |
| − | * [[JControllerAdmin | + | ** [[JControllerAdmin::saveorder/11.1|JControllerAdmin::saveorder]] |
| − | * [[JControllerForm | + | |
| − | * [[JControllerAdmin | + | |
===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> | ||
| − | + | ===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> | ||
| + | |||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 76: | 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 05:12, 1 July 2012
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.
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 |
- Returns
- Defined on line 92 of libraries/joomla/environment/request.php
- Referenced by
See also
-
JRequest::getVar source code on BitBucket
-
Class JRequest
-
Subpackage Environment
- Other versions of JRequest::getVar
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 />
