Exemple #1
0
 function existeHecho(hecho $hecho)
 {
     foreach ($this->hechos as $i => $h) {
         if (strcmp($hecho->getVariable(), $h->getVariable()) == 0) {
             return $h;
         }
     }
     return NULL;
 }
 function setHecho(hecho $hecho)
 {
     $this->setVariable($hecho->getVariable());
     $this->setValor($hecho->getValor());
     $this->setEsNumerico($hecho->getEsNumerico());
 }
 private function buscarReglas(hecho $hecho)
 {
     $conjunto_conflictivo = array();
     foreach ($this->reglas as $i => $regla) {
         if (strcmp($regla->getConsecuente()->getVariable(), $hecho->getVariable()) == 0) {
             $conjunto_conflictivo[] = $regla;
         }
     }
     return $conjunto_conflictivo;
 }