[Solar-svn] Revision 2641
pmjones at solarphp.com
pmjones at solarphp.com
Sat Jul 28 11:37:23 CDT 2007
Branch: Solar_Filter: [FIX] Typos of _filter should be _chain_filters
Modified: branches/orm/Solar/Filter.php
===================================================================
--- branches/orm/Solar/Filter.php 2007-07-28 14:31:06 UTC (rev 2640)
+++ branches/orm/Solar/Filter.php 2007-07-28 16:37:23 UTC (rev 2641)
@@ -40,7 +40,7 @@
* For example, this will filter the $data['rank'] value to validate as
* an integer in the range 0-9.
*
- * $this->_filters = array(
+ * $this->_chain_filters = array(
* 'rank' => array(
* 'validateInt',
* array('validateRange', 0, 9),
@@ -339,14 +339,14 @@
*
* @param string $key The data key.
*
- * @param bool $flag True if required, false if not.
+ * @param bool $flag True if required, false if not. Default true.
*
* @return void
*
* @see applyChain()
*
*/
- public function setChainRequire($key, $flag)
+ public function setChainRequire($key, $flag = true)
{
$this->_chain_require[$key] = (bool) $flag;
}
@@ -540,14 +540,14 @@
}
}
- // check the filters
+ // loop through each data element
foreach ($this->_data as $key => &$val) {
// keep the key name
$this->_data_key = $key;
// are there filters on this key?
- if (empty($this->_filters[$key])) {
+ if (empty($this->_chain_filters[$key])) {
continue;
}
@@ -558,7 +558,7 @@
$this->setRequire(false);
}
- // run the filter series for the key
+ // run the filters for the data element
foreach ($this->_chain_filters[$key] as $params) {
// take the method name off the top of the params ...
More information about the Solar-svn
mailing list