You are here

public function SolrBaseQuery::getParam in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 Solr_Base_Query.php \SolrBaseQuery::getParam()
  2. 6.3 Solr_Base_Query.php \SolrBaseQuery::getParam()

Gets the value of a parameter.

Parameters

string $name: The parameter name.

Return value

The value of the parameter.

Overrides DrupalSolrQueryInterface::getParam

1 call to SolrBaseQuery::getParam()
SolrBaseQuery::getPath in ./Solr_Base_Query.php
Returns the search path (including the search keywords).

File

./Solr_Base_Query.php, line 448
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

public function getParam($name) {
  if ($name == 'fq') {
    return $this
      ->rebuildFq();
  }
  $empty = isset($this
    ->getSingleValueParams()[$name]) ? NULL : array();
  return isset($this->params[$name]) ? $this->params[$name] : $empty;
}