SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 422 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

To overcome this we can use the
alias methods described in the table. This example retrieves someValue as a
floating-point number:
$value = JRequest::getFloat('someValue');
We can use the default value and source hash parameters with the alias methods in
the same way as we do with the getVar() method.
We can apply different masks to reduce the data preprocessing. There are three
masks: JREQUEST_NOTRIM, JREQUEST_ALLOWHTML, and JREQUEST_ALLOWRAW. By
default no mask is applied. In this example we get name from the $_POST hash and
apply the JREQUEST_NOTRIM mask:
$name = JRequest::getVar('name', null, 'POST', 'STRING',
JREQUEST_NOTRIM);
We can also use the mask when using the getString() alias method:
$name = JRequest::getString('name', null, 'POST', JREQUEST_NOTRIM);
To demonstrate the effects of the different masks, here is how four different inputs
will be parsed:
# Input Value
1

Paragraph link


2 CSS
3 space at front of input
4 <p>Para</p>
Chapter 11
[ 317 ]
# Output value (No mask)
1 Paragraph link
2 CSS
3 space at front of input
4 <p>Para</p>
# Output value (mask JREQUEST_NOTRIM)
1 Paragraph link
2 CSS
3 space at front of input
4 <p>Para</p>
# Output value (mask JREQUEST_ALLOWHTML)
1

Paragraph link


2 CSS
3 space at front of input
4 <p>Para</p>
# Output value (mask JREQUEST_ALLOWRAW)
1

Paragraph link


2 CSS 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
druga wojna światowa Free English grammar and study guid hotel jelenia góra Russian bride counter strike 1.6