JRequest: Difference between revisions
From Joomla! Documentation
Layout updates |
Updated to r1448:247ba8d88526 |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
=={{JVer|11.1}} JRequest== | |||
===Description=== | |||
{{Description:JRequest}} | |||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JRequest|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JRequest|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
!Visibility | |||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
|public static | |||
|[[JRequest::_cleanArray/11.1|_cleanArray]] | |[[JRequest::_cleanArray/11.1|_cleanArray]] | ||
|Adds an array to the GLOBALS array and checks that the GLOBALS variable is not being attacked. | |Adds an array to the GLOBALS array and checks that the GLOBALS variable is not being attacked. | ||
|- | |- | ||
|public static | |||
|[[JRequest::_cleanVar/11.1|_cleanVar]] | |[[JRequest::_cleanVar/11.1|_cleanVar]] | ||
|Clean up an input variable. | |Clean up an input variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::checkToken/11.1|checkToken]] | |[[JRequest::checkToken/11.1|checkToken]] | ||
|Checks for a form token in the request. | |Checks for a form token in the request. | ||
|- | |- | ||
|public static | |||
|[[JRequest::clean/11.1|clean]] | |[[JRequest::clean/11.1|clean]] | ||
|Cleans the request from script injection. | |Cleans the request from script injection. | ||
|- | |- | ||
|public static | |||
|[[JRequest::get/11.1|get]] | |[[JRequest::get/11.1|get]] | ||
|Fetches and returns a request array. | |Fetches and returns a request array. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getBool/11.1|getBool]] | |[[JRequest::getBool/11.1|getBool]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getCmd/11.1|getCmd]] | |[[JRequest::getCmd/11.1|getCmd]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getFloat/11.1|getFloat]] | |[[JRequest::getFloat/11.1|getFloat]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getInt/11.1|getInt]] | |[[JRequest::getInt/11.1|getInt]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getMethod/11.1|getMethod]] | |[[JRequest::getMethod/11.1|getMethod]] | ||
|Gets the request method. | |Gets the request method. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getString/11.1|getString]] | |[[JRequest::getString/11.1|getString]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getURI/11.1|getURI]] | |[[JRequest::getURI/11.1|getURI]] | ||
|Gets the full request path. | |Gets the full request path. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getVar/11.1|getVar]] | |[[JRequest::getVar/11.1|getVar]] | ||
|Fetches and returns a given variable. | |Fetches and returns a given variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::getWord/11.1|getWord]] | |[[JRequest::getWord/11.1|getWord]] | ||
|Fetches and returns a given filtered variable. | |Fetches and returns a given filtered variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::set/11.1|set]] | |[[JRequest::set/11.1|set]] | ||
|Sets a request variable. | |Sets a request variable. | ||
|- | |- | ||
|public static | |||
|[[JRequest::setVar/11.1|setVar]] | |[[JRequest::setVar/11.1|setVar]] | ||
|Set a variabe in one of the request variables. | |Set a variabe in one of the request variables. | ||
|- | |- | ||
|protected static | |||
|[[JRequest::_stripSlashesRecursive/11.1|_stripSlashesRecursive]] | |[[JRequest::_stripSlashesRecursive/11.1|_stripSlashesRecursive]] | ||
|Strips slashes recursively on an array. | |Strips slashes recursively on an array. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/environment/request.php | |||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.environment.request' );</source> | <source lang="php">jimport( 'joomla.environment.request' );</source> | ||
===See also=== | ===See also=== | ||
* JRequest source code | * {{JVer|11.1}} '''JRequest source code''' on [[jplatform:environment/request.php|BitBucket]] | ||
* [[JRequest|Other versions of | * {{JVer|11.1}} Subpackage [[Subpackage Environment/11.1|Environment]] | ||
* [[JRequest|Other versions of JRequest]] | |||
{{SeeAlso:JRequest}} | {{SeeAlso:JRequest}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JRequest|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JRequest|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
=== | ===User contributed notes=== | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
| Line 86: | Line 101: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
namespace=CodeExample | |||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JRequest]]</noinclude> | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JRequest]]</noinclude> | ||
Revision as of 23:08, 27 April 2011
JRequest
Description
Template:Description:JRequest [Edit Descripton]
Methods
| Visibility | Method name | Description |
|---|---|---|
| public static | _cleanArray | Adds an array to the GLOBALS array and checks that the GLOBALS variable is not being attacked. |
| public static | _cleanVar | Clean up an input variable. |
| public static | checkToken | Checks for a form token in the request. |
| public static | clean | Cleans the request from script injection. |
| public static | get | Fetches and returns a request array. |
| public static | getBool | Fetches and returns a given filtered variable. |
| public static | getCmd | Fetches and returns a given filtered variable. |
| public static | getFloat | Fetches and returns a given filtered variable. |
| public static | getInt | Fetches and returns a given filtered variable. |
| public static | getMethod | Gets the request method. |
| public static | getString | Fetches and returns a given filtered variable. |
| public static | getURI | Gets the full request path. |
| public static | getVar | Fetches and returns a given variable. |
| public static | getWord | Fetches and returns a given filtered variable. |
| public static | set | Sets a request variable. |
| public static | setVar | Set a variabe in one of the request variables. |
| protected static | _stripSlashesRecursive | Strips slashes recursively on an array. |
- Defined in libraries/joomla/environment/request.php
Importing
jimport( 'joomla.environment.request' );
See also
JRequest source code on BitBucket
Subpackage Environment- Other versions of JRequest
Template:SeeAlso:JRequest [Edit See Also]
User contributed notes
<CodeExamplesForm />