- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
/**
* return the current rule value
* @param String $rule
* @return Mixed
*/
public static function findRule($rule)
{
$criteria=new CDbCriteria;
$criteria->compare('rule',$rule);
$model = self::model();
$model->scenario = 'find_rule';
$result = $model->find($criteria);
if ($result !== NULL) {
if ($result->value === 'TRUE')
$result->value = true;
if ($result->value === 'FALSE')
$result->value = false;
return $result->value;
}else
return false;
}