Differential D13589 Diff 33531 src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | final class PhabricatorSearchApplicationSearchEngine | ||||
} | } | ||||
public static function getIndexableDocumentTypes( | public static function getIndexableDocumentTypes( | ||||
PhabricatorUser $viewer = null) { | PhabricatorUser $viewer = null) { | ||||
// TODO: This is inelegant and not very efficient, but gets us reasonable | // TODO: This is inelegant and not very efficient, but gets us reasonable | ||||
// results. It would be nice to do this more elegantly. | // results. It would be nice to do this more elegantly. | ||||
$indexers = id(new PhutilSymbolLoader()) | $indexers = id(new PhutilClassMapQuery()) | ||||
->setAncestorClass('PhabricatorSearchDocumentIndexer') | ->setAncestorClass('PhabricatorSearchDocumentIndexer') | ||||
->loadObjects(); | ->execute(); | ||||
if ($viewer) { | if ($viewer) { | ||||
$types = PhabricatorPHIDType::getAllInstalledTypes($viewer); | $types = PhabricatorPHIDType::getAllInstalledTypes($viewer); | ||||
} else { | } else { | ||||
$types = PhabricatorPHIDType::getAllTypes(); | $types = PhabricatorPHIDType::getAllTypes(); | ||||
} | } | ||||
$results = array(); | $results = array(); | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |