Exemplo n.º 1
0
 public function getPropertyEntityIdValueMatches(PropertyId $propertyId, EntityId $valueId)
 {
     $propertyText = $propertyId->getSerialization();
     $valueText = $valueId->getSerialization();
     $queryBuilder = new QueryBuilder($this->config->get('WikidataQueryPrefixes'));
     $queryBuilder->select('?id')->where("?id", "wdt:{$propertyText}", "wd:{$valueText}");
     $queryExecuter = new QueryExecuter($this->config->get('WikidataQueryUrl'));
     $results = $queryExecuter->execute($queryBuilder->getSPARQL());
     return $this->parseResults($results);
 }
Exemplo n.º 2
0
 public function testExecuteInvalidArgument()
 {
     $queryExecuter = new QueryExecuter('test.example.com');
     $this->setExpectedException('InvalidArgumentException');
     $queryExecuter->execute(null);
 }