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
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2021 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
19 */
20
21declare(strict_types=1);
22
23namespace oat\tao\model\export\Metadata\JsonLd;
24
25use core_kernel_classes_Property;
26use core_kernel_classes_Resource;
27use core_kernel_classes_Triple;
28
29interface JsonLdTripleEncoderInterface
30{
31    public const RDF_TYPE = 'http://www.w3.org/2000/01/rdf-schema#type';
32    public const RDF_VALUE = 'http://www.w3.org/2000/01/rdf-schema#value';
33    public const RDF_LABEL = 'http://www.w3.org/2000/01/rdf-schema#label';
34
35    public const CONTEXT_VALUE = 'value';
36    public const CONTEXT_TYPE = 'type';
37    public const CONTEXT_ALIAS = 'alias';
38    public const CONTEXT_LABEL = 'label';
39
40    public function encode(
41        array $dataToEncode,
42        core_kernel_classes_Triple $triple,
43        core_kernel_classes_Property $property = null,
44        core_kernel_classes_Resource $widget = null
45    ): array;
46
47    public function isWidgetSupported(string $widgetUri): bool;
48}