Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / search / field / PhabricatorSearchDatasourceField.php
blobd8c1242ef41ebc96de808931398e8d0f3a12221d
1 <?php
3 final class PhabricatorSearchDatasourceField
4 extends PhabricatorSearchTokenizerField {
6 private $datasource;
7 private $conduitParameterType;
9 protected function newDatasource() {
10 return id(clone $this->datasource);
13 public function setDatasource(PhabricatorTypeaheadDatasource $datasource) {
14 $this->datasource = $datasource;
15 return $this;
18 public function setConduitParameterType(ConduitParameterType $type) {
19 $this->conduitParameterType = $type;
20 return $this;
23 protected function newConduitParameterType() {
24 if (!$this->conduitParameterType) {
25 return id(new ConduitStringListParameterType())
26 ->setAllowEmptyList(false);
29 return $this->conduitParameterType;