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 | * @var string |
||
38 | */ |
||
39 | protected $entityType = null; |
||
40 | |||
41 | /** |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $file = null; |
||
46 | |||
47 | /** |
||
48 | * |
||
49 | * {@inheritdoc} |
||
50 | * |
||
51 | * @see \StingerSoft\EntitySearchBundle\Model\Document::addField() |
||
52 | */ |
||
53 | public function addField($fieldname, $value) { |
||
56 | |||
57 | /** |
||
58 | * |
||
59 | * {@inheritdoc} |
||
60 | * |
||
61 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getFields() |
||
62 | */ |
||
63 | public function getFields() { |
||
66 | |||
67 | /** |
||
68 | * |
||
69 | * {@inheritdoc} |
||
70 | * |
||
71 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getFieldValue() |
||
72 | */ |
||
73 | public function getFieldValue($field) { |
||
76 | |||
77 | /** |
||
78 | * |
||
79 | * {@inheritdoc} |
||
80 | * |
||
81 | * @see \StingerSoft\EntitySearchBundle\Model\Document::addMultiValueField() |
||
82 | */ |
||
83 | public function addMultiValueField($field, $value) { |
||
92 | |||
93 | /** |
||
94 | * |
||
95 | * {@inheritdoc} |
||
96 | * |
||
97 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setEntityClass() |
||
98 | */ |
||
99 | public function setEntityClass($clazz) { |
||
102 | |||
103 | /** |
||
104 | * |
||
105 | * {@inheritdoc} |
||
106 | * |
||
107 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getEntityClass() |
||
108 | */ |
||
109 | public function getEntityClass() { |
||
112 | |||
113 | /** |
||
114 | * |
||
115 | * {@inheritdoc} |
||
116 | * |
||
117 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setEntityId() |
||
118 | */ |
||
119 | public function setEntityId($id) { |
||
122 | |||
123 | /** |
||
124 | * |
||
125 | * {@inheritdoc} |
||
126 | * |
||
127 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getEntityId() |
||
128 | */ |
||
129 | public function getEntityId() { |
||
132 | |||
133 | /** |
||
134 | * |
||
135 | * {@inheritdoc} |
||
136 | * |
||
137 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setEntityType() |
||
138 | */ |
||
139 | public function setEntityType($type) { |
||
142 | |||
143 | /** |
||
144 | * |
||
145 | * {@inheritdoc} |
||
146 | * |
||
147 | * @see \StingerSoft\EntitySearchBundle\Model\Document::getEntityType() |
||
148 | */ |
||
149 | public function getEntityType() { |
||
152 | |||
153 | /** |
||
154 | * |
||
155 | * {@inheritdoc} |
||
156 | * |
||
157 | * @see \StingerSoft\EntitySearchBundle\Model\Document::setFile() |
||
158 | */ |
||
159 | public function setFile($path) { |
||
162 | |||
163 | /** |
||
164 | * |
||
165 | * {@inheritdoc} |
||
166 | * |
||
167 | * @see \StingerSoft\EntitySearchBundle\Model\Document::__get() |
||
168 | */ |
||
169 | public function __get($name) { |
||
172 | |||
173 | /** |
||
174 | * |
||
175 | * {@inheritdoc} |
||
176 | * |
||
177 | * @see \StingerSoft\EntitySearchBundle\Model\Document::__isset() |
||
178 | */ |
||
179 | public function __isset($name) { |
||
182 | } |