Convert RdfSyncConnection to a service
2 unresolved threads
2 unresolved threads
Merge request reports
Activity
33 * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory 34 * Config factory. 99 35 */ 100 public static function insertTriples(array $triples): void { 101 $graph = new Graph(); 102 $graph->parse($triples, 'php'); 103 $triples = $graph->serialise('ntriples'); 104 $graphUri = self::getGraphUri(); 105 $query = <<<QUERY 106 WITH <$graphUri> 107 INSERT { 108 $triples 109 } 110 QUERY; 111 self::update($query); 36 public function __construct(ConfigFactoryInterface $configFactory) { This just a note: Constructor doc block is no more mandatory
- src/RdfSyncTriplesInterface.php 0 → 100644
1 <?php 2 3 declare(strict_types=1); 4 5 namespace Drupal\rdf_sync; 6 7 use EasyRdf\GraphStore; 8 9 /** 10 * Provides an interface for the rdf_sync.triples service. 11 */ 12 interface RdfSyncTriplesInterface {
Please register or sign in to reply