Condition.php in Search API 8
File
src/Query/Condition.php
View source
<?php
namespace Drupal\search_api\Query;
class Condition implements ConditionInterface {
protected $field;
protected $value;
protected $operator;
public function __construct($field, $value, $operator = '=') {
$this->field = $field;
$this->value = $value;
$this->operator = $operator;
}
public function getField() {
return $this->field;
}
public function setField($field) {
$this->field = $field;
return $this;
}
public function getValue() {
return $this->value;
}
public function setValue($value) {
$this->value = $value;
return $this;
}
public function getOperator() {
return $this->operator;
}
public function setOperator($operator) {
$this->operator = $operator;
return $this;
}
public function __toString() {
return "{$this->field} {$this->operator} " . str_replace("\n", "\n ", var_export($this->value, TRUE));
}
}
Classes
Name |
Description |
Condition |
Represents a single (field operator value) condition in a search query. |