Skip to content

Commit

Permalink
Merge pull request #3 from pdsinterop/dev
Browse files Browse the repository at this point in the history
Take base URL for parsing
  • Loading branch information
michielbdejong authored Sep 24, 2020
2 parents a70f61d + 4834a1d commit b1c7064
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Flysystem/Plugin/ReadRdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ final public function __construct(\EasyRdf_Graph $rdfConverter)
*
* @param string $path path to file
* @param string $format RDF format to convert file to
* @param string $url base url for parsing
*
* @return array|false metadata
*
* @throws FileNotFoundException
* @throws \Pdsinterop\Rdf\Flysystem\Exception
*/
public function handle(string $path, string $format) : string
public function handle(string $path, string $format, string $url) : string
{
$converter = $this->converter;

Expand All @@ -61,7 +62,7 @@ public function handle(string $path, string $format) : string

if (is_string($contents)) {
try {
$converter->parse($contents, Format::UNKNOWN, Rdf::EMPTY_NODE);
$converter->parse($contents, Format::UNKNOWN, $url);
} catch (\EasyRdf_Exception $exception) {
$this->throwException(self::ERROR_COULD_NOT_CONVERT, [
'file' => $path,
Expand Down

0 comments on commit b1c7064

Please sign in to comment.