1 | <?php |
||
12 | abstract class DataProvider |
||
13 | { |
||
14 | /** |
||
15 | * @var Client |
||
16 | */ |
||
17 | private $client; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $index; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $type; |
||
28 | |||
29 | /** |
||
30 | * Populate index |
||
31 | * |
||
32 | * @param Client $client |
||
33 | * @index string $index |
||
34 | * @index string $type |
||
35 | */ |
||
36 | 2 | public function run(Client $client, $index, $type) |
|
44 | |||
45 | /** |
||
46 | * Populate |
||
47 | * |
||
48 | * @return null |
||
49 | */ |
||
50 | abstract public function populate(); |
||
51 | |||
52 | /** |
||
53 | * Index document |
||
54 | * |
||
55 | * @param string $id |
||
56 | * @param array $body |
||
57 | */ |
||
58 | 1 | public function index($id, array $body) |
|
67 | } |