Ejemplo n.º 1
0
 /**
  * Asserts that the aggregation result for the given aggregator matches the given result.
  *
  * @param mixed $expectedResultOfAggregation
  * @throws VisitorException
  */
 private function assertAggregationResultImpl($expectedResultOfAggregation, Aggregator $a)
 {
     $this->assertSame($expectedResultOfAggregation, $a->accept($this->scalarPresentingVisitor));
 }
 public function accept(AggregatorVisitor $v)
 {
     return $this->if->isTrue() ? $this->then->accept($v) : $this->else->accept($v);
 }
Ejemplo n.º 3
0
 public function visit(Aggregator $a)
 {
     return $a->accept($this->findPresenterOf($a));
 }
Ejemplo n.º 4
0
 /**
  * @param Aggregator $a
  * @throws UnableToCreateXml
  * @return DOMNode
  */
 protected function getDOMNodeOf(Aggregator $a, DOMElement $destination)
 {
     $childXml = $destination->ownerDocument->createDocumentFragment();
     $childXml->appendXML($a->accept($this->presenterOfEveryAggregator));
     return $childXml;
 }