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 | namespace PropertySuggester\Suggesters; |
4 | |
5 | use Wikibase\DataModel\Entity\Item; |
6 | use Wikibase\DataModel\Entity\ItemId; |
7 | use Wikibase\DataModel\Entity\PropertyId; |
8 | |
9 | /** |
10 | * interface for (Property-)Suggester |
11 | * |
12 | * @author BP2013N2 |
13 | * @license GPL-2.0-or-later |
14 | */ |
15 | interface SuggesterEngine { |
16 | |
17 | /** |
18 | * Suggest only properties that might be added (non-deprecated, not yet present) |
19 | */ |
20 | public const SUGGEST_NEW = 'new'; |
21 | |
22 | /** |
23 | * Suggest everything, even already present or deprecated values. |
24 | */ |
25 | public const SUGGEST_ALL = 'all'; |
26 | |
27 | /** |
28 | * Returns suggested attributes |
29 | * |
30 | * @param PropertyId[] $propertyIds |
31 | * @param ItemId[] $typesIds |
32 | * @param int $limit |
33 | * @param float $minProbability |
34 | * @param string $context |
35 | * @param string $include One of the self::SUGGEST_* constants |
36 | * @return Suggestion[] |
37 | */ |
38 | public function suggestByPropertyIds( |
39 | array $propertyIds, |
40 | array $typesIds, |
41 | $limit, |
42 | $minProbability, |
43 | $context, |
44 | $include |
45 | ); |
46 | |
47 | /** |
48 | * Returns suggested attributes |
49 | * |
50 | * @param Item $item |
51 | * @param int $limit |
52 | * @param float $minProbability |
53 | * @param string $context |
54 | * @param string $include One of the self::SUGGEST_* constants |
55 | * @return Suggestion[] |
56 | */ |
57 | public function suggestByItem( Item $item, $limit, $minProbability, $context, $include ); |
58 | |
59 | } |