TextToken.php in Search API 8
File
src/Plugin/search_api/data_type/value/TextToken.php
View source
<?php
namespace Drupal\search_api\Plugin\search_api\data_type\value;
class TextToken implements TextTokenInterface {
protected $text;
protected $boost = 1.0;
public function __construct($text, $boost = 1.0) {
$this->text = $text;
$this->boost = $boost;
}
public function getText() {
return $this->text;
}
public function setText($text) {
$this->text = $text;
return $this;
}
public function getBoost() {
return $this->boost;
}
public function setBoost($boost) {
$this->boost = $boost;
return $this;
}
public function __toString() {
return $this
->getText();
}
}
Classes
Name |
Description |
TextToken |
Represents a single text token contained in a fulltext field's value. |