Changeset 3122
- Timestamp:
- 04/14/08 20:46:22 (3 months ago)
- Files:
-
- trunk/Solar/Filter.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Solar/Filter.php
r3094 r3122 559 559 } 560 560 561 // loop through each data element 562 foreach ($this->_data as $key => $val) { 563 564 // keep the key name 565 $this->_data_key = $key; 566 561 // which elements to filter? 562 $keys = array_keys($this->_chain_filters); 563 564 // loop through each element to be filtered 565 foreach ($keys as $key) { 567 566 // if it's already invalid (from "require" above) 568 567 // then skip it. this avoids multiple validation … … 570 569 if (! empty($this->_chain_invalid[$key])) { 571 570 continue; 571 } else { 572 // run the filters for the data element 573 $this->_applyChain($key); 572 574 } 573 574 // are there filters on this key?575 if (empty($this->_chain_filters[$key])) {576 continue;577 }578 579 // is this key required?580 if (! empty($this->_chain_require[$key])) {581 $this->setRequire(true);582 } else {583 $this->setRequire(false);584 }585 586 // run the filters for each data element587 $this->_applyChain($key);588 575 } 589 576 … … 606 593 protected function _applyChain($key) 607 594 { 608 foreach ($this->_chain_filters[$key] as $params) { 595 // keep the key name 596 $this->_data_key = $key; 597 598 // is this key required? 599 if (! empty($this->_chain_require[$key])) { 600 $this->setRequire(true); 601 } else { 602 $this->setRequire(false); 603 } 604 605 foreach ((array) $this->_chain_filters[$key] as $params) { 609 606 610 607 // take the method name off the top of the params ...
