Different between JRequest methods

From Joomla! Documentation

Jump to: navigation, search

JRequest::getVar()

getVar is used to retrieve GET/POST request data.

JRequest::getVar( 'name' )

JRequest::getWord()

JRequest::getWord() is a proxy method to JRequest::getVar() which is used to get a variable from the request and sanitize it. The getWord() part means to pass it through what we call the "word" filter. The word filter allows alphanumeric characters plus underscores and dashes I believe.

JRequest::getWord( 'name' )

JRequest::get()

To receive a whole array filtered. If you would want to get the POST data, you can use this.

JRequest::get( 'post' )
Personal tools