static function Solr_Base_Query::query_replace in Apache Solr Search 5
Replaces all occurances of $option in $keys.
1 call to Solr_Base_Query::query_replace()
File
- ./
Solr_Base_Query.php, line 48
Class
Code
static function query_replace($keys, $option) {
$matches = Solr_Base_Query::query_extract($keys, $option);
if (count($matches) > 0) {
foreach ($matches as $match) {
// TODO: Make some sort of name->value container object.
$found = Solr_Base_Query::make_field(array(
'#name' => $option,
'#value' => $match,
));
$keys = str_replace($found, '', $keys);
}
}
return $keys;
}