Is there any way to output all filtered data from the class Zend_Filter_Input?
Sorry I have made a mistake. I need to get an array storing all filtered data.
Alan
2009-07-24 01:34:37
$form->getValues(); :P
Tomáš Fejfar
2009-07-24 08:27:38
+2
A:
Zend_Filter_Input
offers numerous methods for retrieving filtered and validated data.
First, you can retrieve an associative array of all fields:
$data = $input->getEscaped(); // Retrieve all data, escaped with Zend_Filter_HtmlEntities
$data = $input->getUnescaped(); // Retrieve all data, not escaped.
You can also get an associative array of certain segments of you data, the method names are very clear:
$invalidFields = $input->getInvalid(); // Fields that failed validation
$missingFields = $input->getMissing(); // Fields that were declared as 'required' using the 'presence' metacommand, but not in the input
$unknownFields = $input->getUnknown(); // Fields that were not declared in the validator rules, but were present in the input.
On top of all that, Zend_Filter_Input
offers an object accessor, through an implementation of the __get
magic method:
$oneField = $input->oneFieldName
jason
2009-07-24 03:31:41