$search_terms
$search_terms : string
The trimmed string searched, we keep it as the canonical reference
Search class
Allows searching for data in our repositories using a fluent interface. Currently, only the regex part (definition of the search) and defining the search options are implemented. e.g.: $search = (new Search) ->setSearchTerms('Bookmark this page') ->setRegexCaseInsensitive(true) ->setRegexEntireString(false) ->setEachWord(false) ->setEntireWords(false) ->setRepository('gecko_strings') ->setSearchType('strings') ->setLocales(['en-US', 'fr']);
setRegexSearchTerms(string $string) : $this
Allows setting a new searched term for the regex.
This is mostly useful when you have a multi-words search and need to loop through all the words to return results.
string | $string | The string we want to update the regex for |
setLocales(array $locales) : $this
Set the locales we will use for the search with this structure: $this->locales = [ 'source' => 'en-US', 'target' => 'de', 'extra' => 'ar', ];
The 'extra' value is optional and used in views comparing data for 3 locales.
array | $locales | The locale codes |