You are here

public function SearchApiSolrDocument::__set in Search API Solr 7

Magic setter for field values.

Multi-valued fields should be set as arrays or via the addField() function which will automatically make sure the field is an array.

Parameters

string $key: The name of the field.

string|array $value: The value to set for the field.

File

includes/document.inc, line 403

Class

SearchApiSolrDocument
Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:

Code

public function __set($key, $value) {
  $this
    ->setField($key, $value);
}