1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Queryr\TermStore; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Package public |
7
|
|
|
* @since 0.2 |
8
|
|
|
* |
9
|
|
|
* @licence GNU GPL v2+ |
10
|
|
|
* @author Jeroen De Dauw < [email protected] > |
11
|
|
|
*/ |
12
|
|
|
interface EntityIdLookup { |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Returns the first matching entity id. Case insensitive. |
16
|
|
|
* |
17
|
|
|
* @param string $labelLanguageCode |
18
|
|
|
* @param string $labelText |
19
|
|
|
* |
20
|
|
|
* @return string|null |
21
|
|
|
* @throws TermStoreException |
22
|
|
|
*/ |
23
|
|
|
public function getIdByLabel( string $labelLanguageCode, string $labelText ): ?string; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* Returns the first matching item id. Case insensitive. |
27
|
|
|
* |
28
|
|
|
* @param string $labelLanguageCode |
29
|
|
|
* @param string $labelText |
30
|
|
|
* |
31
|
|
|
* @return string|null |
32
|
|
|
* @throws TermStoreException |
33
|
|
|
*/ |
34
|
|
|
public function getItemIdByLabel( string $labelLanguageCode, string $labelText ): ?string; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Returns the first matching property id. Case insensitive. |
38
|
|
|
* |
39
|
|
|
* @param string $labelLanguageCode |
40
|
|
|
* @param string $labelText |
41
|
|
|
* |
42
|
|
|
* @return string|null |
43
|
|
|
* @throws TermStoreException |
44
|
|
|
*/ |
45
|
|
|
public function getPropertyIdByLabel( string $labelLanguageCode, string $labelText ): ?string; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Returns the first matching entity id. Case insensitive. |
49
|
|
|
* |
50
|
|
|
* @param string $languageCode |
51
|
|
|
* @param string $termText |
52
|
|
|
* |
53
|
|
|
* @return string|null |
54
|
|
|
* @throws TermStoreException |
55
|
|
|
*/ |
56
|
|
|
public function getIdByText( string $languageCode, string $termText ): ?string; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Returns the first matching item id. Case insensitive. |
60
|
|
|
* |
61
|
|
|
* @param string $languageCode |
62
|
|
|
* @param string $termText |
63
|
|
|
* |
64
|
|
|
* @return string|null |
65
|
|
|
* @throws TermStoreException |
66
|
|
|
*/ |
67
|
|
|
public function getItemIdByText( string $languageCode, string $termText ): ?string; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* Returns the first matching property id. Case insensitive. |
71
|
|
|
* |
72
|
|
|
* @param string $languageCode |
73
|
|
|
* @param string $termText |
74
|
|
|
* |
75
|
|
|
* @return string|null |
76
|
|
|
* @throws TermStoreException |
77
|
|
|
*/ |
78
|
|
|
public function getPropertyIdByText( string $languageCode, string $termText ): ?string; |
79
|
|
|
|
80
|
|
|
} |