1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-12 00:26:13 +01:00
phorge-phorge/src/applications/conduit/query/ConduitResultSearchEngineExtension.php
epriestley 4ec6990ca7 Implement a rough initial version of ApplicationSearch-driven Conduit read endpoints
Summary:
Ref T9964. See that task for some context and discussion.

Ref T7715, which has the bigger picture here.

Basically, I want Conduit read endpoints to be full-power, ApplicationSearch-driven endpoints, so that applications can:

  - Write one EditEngine and get web + conduit writes for free.
  - Write one SearchEngine and get web + conduit reads for free.

I previously made some steps toward this, but this puts more of the structure in place.

Test Plan:
Viewed API console endpoint and read 20 pages of docs:

{F1021961}

Made various calls: with query keys, constraints, pagination, and limits.

Viewed new {nav Config > Modules} page.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7715, T9964

Differential Revision: https://secure.phabricator.com/D14743
2015-12-11 15:27:06 -08:00

28 lines
644 B
PHP

<?php
final class ConduitResultSearchEngineExtension
extends PhabricatorSearchEngineExtension {
const EXTENSIONKEY = 'conduit';
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Support for ConduitResultInterface');
}
public function supportsObject($object) {
return ($object instanceof PhabricatorConduitResultInterface);
}
public function getFieldSpecificationsForConduit($object) {
return $object->getFieldSpecificationsForConduit();
}
public function getFieldValuesForConduit($object) {
return $object->getFieldValuesForConduit();
}
}