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 * Stable identifiers for embedded objects (Value, Dimensions, Party, ...).
11 *
12 * The spec requires every embedded object to have an id that never changes
13 * during its lifetime, because change requests address embedded objects by
14 * it. Ids are minted once, when the object enters a stored logistics object,
15 * and kept in the stored graph from then on.
16 */
17interface EmbeddedIdMinter
18{
19    /**
20     * @param Iri $parent the logistics object the embedded object belongs to
21     * @param string $discriminator something unique for this embedded object within the parent and revision
22     */
23    public function mint(Iri $parent, string $discriminator): Iri;
24}