Updated OSB to work with KH 3.1

This commit is contained in:
Deon George
2011-05-14 17:35:33 +10:00
parent 6d256839fc
commit 9dda9f43f4
42 changed files with 397 additions and 347 deletions

View File

@@ -0,0 +1,27 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* Array and variable validation.
*
* @package OSB/Modifications
* @category Classes
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Valid extends Kohana_Valid {
/**
* Checks if a field matches the value of another field, if it is set.
* Field is ignored if it is blank.
*
* @param array array of values
* @param string field name
* @param string field name to match
* @return boolean
*/
public static function matches_ifset($array, $field, $match)
{
return isset($array[$match]) ? ($array[$field] === $array[$match]) : TRUE;
}
}
?>