1 | <?php |
||
14 | abstract class DataProvider implements DataProviderInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Client |
||
18 | */ |
||
19 | private $client; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $index; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $type; |
||
30 | |||
31 | /** |
||
32 | * @var EventDispatcherInterface |
||
33 | */ |
||
34 | private $dispatcher; |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 2 | public function run( |
|
52 | |||
53 | /** |
||
54 | * Populate |
||
55 | * |
||
56 | * @return null |
||
57 | */ |
||
58 | abstract protected function populate(); |
||
59 | |||
60 | /** |
||
61 | * Index document |
||
62 | * |
||
63 | * @param string $id |
||
64 | * @param array $body |
||
65 | */ |
||
66 | 1 | public function index($id, array $body) |
|
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function count() |
||
88 | } |
||
89 |