本文整理汇总了PHP中Rule::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Rule::getId方法的具体用法?PHP Rule::getId怎么用?PHP Rule::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rule
的用法示例。
在下文中一共展示了Rule::getId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$r = array();
foreach ($_REQUEST as $i => $v) {
$r[join('.', explode('_', $i))] = $v;
//convert _ back to .
}
$source = @$r['0'];
$target = @$r['1'];
$overtredingen = array();
for ($i0 = 0; isset($r['2.' . $i0]); $i0++) {
$overtredingen[$i0] = @$r['2.' . $i0 . ''];
}
$uitleg = @$r['3'];
$pattern = @$r['4'];
$Rule = new Rule($ID, $source, $target, $overtredingen, $uitleg, $pattern);
if ($Rule->save() !== false) {
die('ok:' . serviceref($_REQUEST['content']) . '&Rule=' . urlencode($Rule->getId()));
} else {
die('Please fix errors!');
}
exit;
// do not show the interface
}
$buttons = "";
if (isset($_REQUEST['new'])) {
$new = true;
} else {
$new = false;
}
if (isset($_REQUEST['edit']) || $new) {
$edit = true;
} else {
示例2: addRule
/**
* Add a rule as a reason
*
* @param Rule $rule A rule which is a reason for this problem
*/
public function addRule(Rule $rule)
{
$this->addReason($rule->getId(), array('rule' => $rule, 'job' => $rule->getJob()));
}
示例3: addRule
/**
* @param Rule $rule
*/
public function addRule(Rule $rule)
{
$this->rules[$rule->getId()] = $rule;
}