Documentation

ValueMapper
in package

Provides vocabulary mappings. Assumes a value is an URL which can be resolved to the RDF . Then extracts given property values from the RDF.

Implements caching.

Tags
author

zozlak

Table of Contents

Properties

$cache  : array<string, resource>
$client  : Client
$failed  : array<string, bool>

Methods

__construct()  : mixed
getMapping()  : array<string|int, resource>
Returns mapped values.
fetch()  : void
Fetches mappings from the value URL into the cache.

Properties

Methods

__construct()

public __construct([array<string, mixed> $guzzleOptions = [] ]) : mixed
Parameters
$guzzleOptions : array<string, mixed> = []

connection options to be used while fetching the data - see http://docs.guzzlephp.org/en/stable/request-options.html

getMapping()

Returns mapped values.

public getMapping(string $value, string $property) : array<string|int, resource>
Parameters
$value : string

value to be mapped

$property : string

RDF property which value should be returned

Return values
array<string|int, resource>

mapped values

fetch()

Fetches mappings from the value URL into the cache.

private fetch(string $value) : void
Parameters
$value : string

value URL to be resolved


        
On this page

Search results