1 | <?php |
||
14 | class DocumentAdapter implements Document { |
||
15 | |||
16 | /** |
||
17 | * Stores are fields with their values which should be stored in the index |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $fields = array(); |
||
22 | |||
23 | /** |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $entityClass = null; |
||
28 | |||
29 | /** |
||
30 | * |
||
31 | * @var mixed |
||
32 | */ |
||
33 | protected $entityId = null; |
||
34 | |||
35 | /** |
||
36 | * |
||
37 | * {@inheritDoc} |
||
38 | * |
||
39 | * @see \StingerSoft\EntitySearchBundle\Model\Document::addField() |
||
40 | */ |
||
41 | public function addField($fieldname, $value) { |
||
44 | |||
45 | /** |
||
46 | * |
||
47 | * {@inheritDoc} |
||
48 | * |
||
49 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getFields() |
||
50 | */ |
||
51 | public function getFields() { |
||
54 | |||
55 | /** |
||
56 | * |
||
57 | * {@inheritDoc} |
||
58 | * |
||
59 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getFieldValue() |
||
60 | */ |
||
61 | public function getFieldValue($field) { |
||
64 | |||
65 | /** |
||
66 | * |
||
67 | * {@inheritDoc} |
||
68 | * |
||
69 | * @see \StingerSoft\EntitySearchBundle\Model\Document::addMultiValueField() |
||
70 | */ |
||
71 | public function addMultiValueField($field, $value) { |
||
80 | |||
81 | /** |
||
82 | * |
||
83 | * {@inheritDoc} |
||
84 | * |
||
85 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setEntityClass() |
||
86 | */ |
||
87 | public function setEntityClass($clazz) { |
||
90 | |||
91 | /** |
||
92 | * |
||
93 | * {@inheritDoc} |
||
94 | * |
||
95 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getEntityClass() |
||
96 | */ |
||
97 | public function getEntityClass() { |
||
100 | |||
101 | /** |
||
102 | * |
||
103 | * {@inheritDoc} |
||
104 | * |
||
105 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setEntityId() |
||
106 | */ |
||
107 | public function setEntityId($id) { |
||
110 | |||
111 | /** |
||
112 | * |
||
113 | * {@inheritDoc} |
||
114 | * |
||
115 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getEntityId() |
||
116 | */ |
||
117 | public function getEntityId() { |
||
120 | } |