Example #1
0
 public function getId($rule)
 {
     $tmp = array_search($rule, $this->rules, true);
     if (!empty($tmp)) {
         return $tmp;
     } else {
         RuleError::notExists($rule);
         return -1;
     }
 }