Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / search / engineextension / PhabricatorDatasourceEngineExtension.php
blobc568e9e14dda68198b0de61743d26ea4e1fb4c15
1 <?php
3 abstract class PhabricatorDatasourceEngineExtension extends Phobject {
5 private $viewer;
7 final public function setViewer(PhabricatorUser $viewer) {
8 $this->viewer = $viewer;
9 return $this;
12 final public function getViewer() {
13 return $this->viewer;
16 public function newQuickSearchDatasources() {
17 return array();
20 public function newJumpURI($query) {
21 return null;
24 public function newDatasourcesForCompositeDatasource(
25 PhabricatorTypeaheadCompositeDatasource $datasource) {
26 return array();
29 final public static function getAllExtensions() {
30 return id(new PhutilClassMapQuery())
31 ->setAncestorClass(__CLASS__)
32 ->execute();
35 final public static function getAllQuickSearchDatasources() {
36 $extensions = self::getAllExtensions();
38 $datasources = array();
39 foreach ($extensions as $extension) {
40 $datasources[] = $extension->newQuickSearchDatasources();
43 return array_mergev($datasources);