예제 #1
0
 public static function getAllRules()
 {
     if (is_null(self::$allRules)) {
         $rules = file_get_contents(__DIR__ . '/../generics/rules.json');
         $rules = json_decode($rules, true);
         self::$allInvariantRules = (array) $rules['invariants'];
         self::$allProcessRules = (array) $rules['signals'];
         $allRules = array();
         foreach (array_merge((array) $rules['invariants'], (array) $rules['signals']) as $r) {
             $allRules[$r['name']] = $r;
         }
         self::$allRules = $allRules;
     }
     return self::$allRules;
 }