@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3abstract class PhabricatorExportEngineExtension extends Phobject {
4
5 private $viewer;
6
7 final public function getExtensionKey() {
8 return $this->getPhobjectClassConstant('EXTENSIONKEY');
9 }
10
11 final public function setViewer($viewer) {
12 $this->viewer = $viewer;
13 return $this;
14 }
15
16 final public function getViewer() {
17 return $this->viewer;
18 }
19
20 abstract public function supportsObject($object);
21 abstract public function newExportFields();
22 abstract public function newExportData(array $objects);
23
24 final public static function getAllExtensions() {
25 return id(new PhutilClassMapQuery())
26 ->setAncestorClass(self::class)
27 ->setUniqueMethod('getExtensionKey')
28 ->execute();
29 }
30
31}