1 | <?php |
||
25 | class SphinxClient extends \SphinxClient |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritdoc }. |
||
29 | * |
||
30 | * SPH_MATCH_ALL, matches all query words (<b>default mode</b>); |
||
31 | * SPH_MATCH_ANY, matches any of the query words; |
||
32 | * SPH_MATCH_PHRASE, matches query as a phrase, requiring perfect match; |
||
33 | * SPH_MATCH_BOOLEAN, matches query as a boolean expression; |
||
34 | * SPH_MATCH_EXTENDED, matches query as an expression in Sphinx internal query language; |
||
35 | * SPH_MATCH_FULLSCAN, matches query, forcibly using the "full scan" mode as below. |
||
36 | * |
||
37 | * @see http://sphinxsearch.com/docs/current.html#matching-modes Matching modes |
||
38 | */ |
||
39 | public function SetMatchMode($mode) |
||
43 | |||
44 | /** |
||
45 | * Uso amigavel da definicao de Match Mode. |
||
46 | * |
||
47 | * @param string $modeName all|any|phrase|boolean |
||
48 | */ |
||
49 | public function setMatchModeByModeName($modeName) |
||
67 | |||
68 | /** |
||
69 | * Define a ordem de resultados. |
||
70 | * |
||
71 | * @param string $string |
||
72 | */ |
||
73 | public function setSortExtended($string) |
||
77 | |||
78 | /** |
||
79 | * Agrupa resultados por atributo. |
||
80 | * |
||
81 | * @param string $attr |
||
82 | */ |
||
83 | public function setGroupByAttr($attr) |
||
87 | |||
88 | /** |
||
89 | * Adiciona multiplas queries a partir de uma query |
||
90 | * matriz e chaves usadas na busca facetada. |
||
91 | * |
||
92 | * Multi-queries are just a mechanism that lets you send several search |
||
93 | * queries to searchd in one batch. That, in turn, lets searchd internally |
||
94 | * optimize common parts between the queries. And that’s where the savings |
||
95 | * come from. |
||
96 | * |
||
97 | * @see http://sphinxsearch.com/blog/2010/04/05/facets-multi-queries-and-searching-3x-faster/ |
||
98 | * |
||
99 | * @param string $query |
||
100 | * @param string $index |
||
101 | * @param array $keys |
||
102 | */ |
||
103 | public function addFacetedQuery($query, $index, array $keys) |
||
129 | } |
||
130 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.