Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Model;
6
7use LambdaTwelve\OneRecord\Rdf\Iri;
8
9/**
10 * How a host forms the public URI of a logistics object it publishes.
11 *
12 * The spec fixes the shape ({base}/logistics-objects/{id}) and leaves the id
13 * to the implementer. A host that wants ids derived from its own records
14 * (so a republished graph gets the same URIs partners already hold)
15 * implements this; the defaults mint UUIDs under a base URL.
16 *
17 * @param list<string> $types class IRIs of the object, in case ids are type-specific
18 */
19interface IriMinter
20{
21    /**
22     * @param string $localKey the key the object has inside the graph being published
23     * @param list<string> $types
24     */
25    public function mint(string $localKey, array $types): Iri;
26}