@@ 20-27 (lines=8) @@ | ||
17 | /** |
|
18 | * @return array |
|
19 | */ |
|
20 | public function suggestions() |
|
21 | { |
|
22 | if (isset($this->params['q']) && isset($this['spellcheck']['suggestions'][$this->params['q']]['suggestion'])) { |
|
23 | return $this['spellcheck']['suggestions'][$this->params['q']]['suggestion']; |
|
24 | } else { |
|
25 | return array(); |
|
26 | } |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * @return int |
|
@@ 32-39 (lines=8) @@ | ||
29 | /** |
|
30 | * @return int |
|
31 | */ |
|
32 | public function numFound() |
|
33 | { |
|
34 | if (isset($this->params['q']) && isset($this['spellcheck']['suggestions'][$this->params['q']]['numFound'])) { |
|
35 | return $this['spellcheck']['suggestions'][$this->params['q']]['numFound']; |
|
36 | } else { |
|
37 | return 0; |
|
38 | } |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * @return int |
|
@@ 44-51 (lines=8) @@ | ||
41 | /** |
|
42 | * @return int |
|
43 | */ |
|
44 | public function startOffset() |
|
45 | { |
|
46 | if (isset($this->params['q']) && isset($this['spellcheck']['suggestions'][$this->params['q']]['startOffset'])) { |
|
47 | return $this['spellcheck']['suggestions'][$this->params['q']]['startOffset']; |
|
48 | } else { |
|
49 | return 0; |
|
50 | } |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @return int |
|
@@ 56-63 (lines=8) @@ | ||
53 | /** |
|
54 | * @return int |
|
55 | */ |
|
56 | public function endOffset() |
|
57 | { |
|
58 | if (isset($this->params['q']) && isset($this['spellcheck']['suggestions'][$this->params['q']]['endOffset'])) { |
|
59 | return $this['spellcheck']['suggestions'][$this->params['q']]['endOffset']; |
|
60 | } else { |
|
61 | return 0; |
|
62 | } |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @return string |