Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / infrastructure / customfield / standard / PhabricatorStandardCustomFieldDatasource.php
blob49b9ab2cb51ab038895f0a887ff4f95dec332a22
1 <?php
3 final class PhabricatorStandardCustomFieldDatasource
4 extends PhabricatorStandardCustomFieldTokenizer {
6 public function getFieldType() {
7 return 'datasource';
10 public function getDatasource() {
11 $parameters = $this->getFieldConfigValue('datasource.parameters', array());
13 $class = $this->getFieldConfigValue('datasource.class');
14 $parent = 'PhabricatorTypeaheadDatasource';
15 if (!is_subclass_of($class, $parent)) {
16 throw new Exception(
17 pht(
18 'Configured datasource class "%s" must be a valid subclass of '.
19 '"%s".',
20 $class,
21 $parent));
24 return newv($class, array())
25 ->setParameters($parameters);