function parseRules() { $rules = array(); $CP = new ConnectiveParser($this->ER, $this->XPath); $BBAP = new BBAParser($this->ER, $this->XPath); $BBAP->parseBBAs(); $DBAP = new DBAParser($this->ER, $this->XPath, $CP); $DBAP->parseDBAs(); $TSR = new TaskSettingRule($this->XPath->evaluate('//TaskSetting')->item(0), $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP); try { $TSR->parse($DBAP, $BBAP); array_push($rules, $TSR); } catch (InvalidRuleException $e) { } return $rules; }
function parseRules() { $rules = array(); $CP = new ConnectiveParser($this->ER, $this->XPath); $BBAP = new BBAParser($this->ER, $this->XPath); $BBAP->parseBBAs(); $DBAP = new DBAParser($this->ER, $this->XPath, $CP); $DBAP->parseDBAs(); foreach ($this->XPath->evaluate('//AssociationRule') as $iAR) { $AR = new AssociationRule($iAR, $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP); try { $AR->parse($DBAP, $BBAP); array_push($rules, $AR); } catch (InvalidRuleException $e) { } } return $rules; }
public function testParseBBAs() { $BBAP = new BBAParser($this->ERXQuery, $this->ERXQueryXPath); $this->assertEquals(24, $BBAP->parseBBAs()); }