本文整理汇总了PHP中Rule::setRuleFileActive方法的典型用法代码示例。如果您正苦于以下问题:PHP Rule::setRuleFileActive方法的具体用法?PHP Rule::setRuleFileActive怎么用?PHP Rule::setRuleFileActive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rule
的用法示例。
在下文中一共展示了Rule::setRuleFileActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rule_insert
function rule_insert($post, $db)
{
$new_rule = new Rule();
$new_rule->setRuleID($post['rule_id']);
$new_rule->setRuleParrentRuleID($post['rule_pid']);
$new_rule->setRuleFileID($post['rf_filter']);
$new_rule->setRuleInformation($post['rule_msg']);
$new_rule->setRule($post['rule']);
$new_rule->setRuleFileActive($post['validity']);
$new_rule->setFilled(true);
$db->addRule($new_rule);
}
示例2: getAllRuleFiles
public function getAllRuleFiles($where = '')
{
$count_str = "SELECT RF.RuleFileID,COUNT(R.RecordID),COUNT(DISTINCT(RDF.DataFileID)),\n RF.RuleFileName,RF.Deleted from rule_files RF\n LEFT JOIN rules R ON (RF.RuleFileID=R.RuleFileID AND R.Deleted=0)\n LEFT JOIN rule_data_files RDF ON (RDF.DataFileID=RF.RuleFileID AND RDF.Deleted=0)\n {$where} GROUP BY RF.RuleFileID";
$result = $this->dbh->query($count_str);
if (PEAR::isError($result)) {
echo $result->getMessage() . ' - ' . $result->getUserinfo();
exit;
}
$array = $result->fetchAll();
$result->free();
$rule_files_a = array();
foreach ($array as $rf) {
$rule_file = new Rule();
$rule_file->setRuleFileID($rf[0]);
$rule_file->setRuleFileRuleCount($rf[1]);
$rule_file->setRuleFileRuleDataFileCount($rf[2]);
$rule_file->setRuleFileName($rf[3]);
$rule_file->setRuleFileActive($rf[4]);
$rule_files_a[] = $rule_file;
}
return $rule_files_a;
}