@@ 422-432 (lines=11) @@ | ||
419 | // Get all defined field names |
|
420 | $fields = array_keys($array); |
|
421 | ||
422 | foreach ($this->pre_filters as $field => $callbacks) { |
|
423 | foreach ($callbacks as $callback) { |
|
424 | if ($field === '*') { |
|
425 | foreach ($fields as $f) { |
|
426 | $this[$f] = is_array($this[$f]) ? array_map($callback, $this[$f]) : call_user_func($callback, $this[$f]); |
|
427 | } |
|
428 | } else { |
|
429 | $this[$field] = is_array($this[$field]) ? array_map($callback, $this[$field]) : call_user_func($callback, $this[$field]); |
|
430 | } |
|
431 | } |
|
432 | } |
|
433 | ||
434 | if ($this->submitted === false) { |
|
435 | return false; |
|
@@ 534-544 (lines=11) @@ | ||
531 | } |
|
532 | } |
|
533 | ||
534 | foreach ($this->post_filters as $field => $callbacks) { |
|
535 | foreach ($callbacks as $callback) { |
|
536 | if ($field === '*') { |
|
537 | foreach ($fields as $f) { |
|
538 | $this[$f] = is_array($this[$f]) ? array_map($callback, $this[$f]) : call_user_func($callback, $this[$f]); |
|
539 | } |
|
540 | } else { |
|
541 | $this[$field] = is_array($this[$field]) ? array_map($callback, $this[$field]) : call_user_func($callback, $this[$field]); |
|
542 | } |
|
543 | } |
|
544 | } |
|
545 | ||
546 | // Return TRUE if there are no errors |
|
547 | return $this->errors === array(); |