/** * Adds the given triple/double/single value as an additional condition * to the previously added condition. * * @param string $subject * @param string|null $predicate * @param string|null $object * @return self * @throws InvalidArgumentException */ public function also($subject, $predicate = null, $object = null) { $this->graphBuilder->also($subject, $predicate, $object); return $this; }
public function testGetSPARQL() { $graphBuilder = new GraphBuilder(new UsageValidator()); $graphBuilder->where('?a', '?b', '?c'); $graphBuilder->also('?x', '?y'); $graphBuilder->also('?z'); $graphBuilder->where('?a', '?b', '?z'); $this->assertEquals(' ?a ?b ?c , ?z ; ?x ?y , ?z .', $graphBuilder->getSPARQL()); }