You are here

protected function SolrBaseQuery::normalizeParamValue in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 Solr_Base_Query.php \SolrBaseQuery::normalizeParamValue()
  2. 6.3 Solr_Base_Query.php \SolrBaseQuery::normalizeParamValue()
1 call to SolrBaseQuery::normalizeParamValue()
SolrBaseQuery::addParam in ./Solr_Base_Query.php
Adds a param to be sent when running the Solr search.

File

./Solr_Base_Query.php, line 542
This class allows you to make operations on a query that will be sent to Apache Solr. methods such as adding and removing sorts, remove and replace parameters, adding and removing filters, getters and setters for various parameters and more

Class

SolrBaseQuery

Code

protected function normalizeParamValue($value) {

  // Convert boolean to string.
  if (is_bool($value)) {
    return $value ? 'true' : 'false';
  }

  // Convert to trimmed string.
  return trim($value);
}