1 | <?php |
||
8 | class Field |
||
9 | { |
||
10 | const UPDATE_REPLACE = 'set'; |
||
11 | const UPDATE_ADD = 'add'; |
||
12 | const UPDATE_INCREMENT = 'inc'; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $values; |
||
23 | |||
24 | /** |
||
25 | * @var float |
||
26 | */ |
||
27 | protected $boost; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $update; |
||
33 | |||
34 | /** |
||
35 | * @param string $name |
||
36 | * @param string|array $values |
||
37 | * @param float $boost |
||
38 | */ |
||
39 | public function __construct($name, $values, $boost = 0.0) |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getName() |
||
53 | |||
54 | /** |
||
55 | * @param float $boost |
||
56 | * |
||
57 | * @return \PSolr\Request\Document |
||
58 | */ |
||
59 | public function setBoost($boost) |
||
64 | |||
65 | /** |
||
66 | * @return float |
||
67 | */ |
||
68 | public function getBoost($boost) |
||
72 | |||
73 | /** |
||
74 | * @param string $values |
||
75 | * |
||
76 | * @return \PSolr\Request\Document |
||
77 | */ |
||
78 | public function setValues($values) |
||
83 | |||
84 | /** |
||
85 | * @return array |
||
86 | */ |
||
87 | public function getValues() |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | * |
||
95 | * @return \PSolr\Request\Document |
||
96 | */ |
||
97 | public function addValue($value) |
||
101 | |||
102 | /** |
||
103 | * @param string $update |
||
104 | * |
||
105 | * @return \PSolr\Request\Document |
||
106 | * |
||
107 | * @see http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22field.22 |
||
108 | */ |
||
109 | public function setAtomicUpdate($update) |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function asXml() |
||
139 | |||
140 | /** |
||
141 | * @return string |
||
142 | */ |
||
143 | public function __toString() |
||
147 | } |
||
148 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.