mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-27 05:59:08 +01:00
Summary: Ref T2852. - Broadly, we support "I have a Ref, I need a PHID" well but not "I have a PHID, I need a Ref". - Add DoorkeeperExternalObjectQuery, and use it to query ExternalObjects. - Allow external objects to be imported by their internal PHIDs. Basically, if we have an edge pointing at an ExternalObject, we can say "load all the data about this" from just the PHID and have it hit all the same code. - Allow construction of Refs from ExternalObjects. This makes the "I have a PHID, I need a Ref" easier. Test Plan: - Verified Asana links still enrich properly at display time. - Used in future revision. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2852 Differential Revision: https://secure.phabricator.com/D6294
26 lines
501 B
PHP
26 lines
501 B
PHP
<?php
|
|
|
|
abstract class DoorkeeperBridge extends Phobject {
|
|
|
|
private $viewer;
|
|
|
|
final public function setViewer($viewer) {
|
|
$this->viewer = $viewer;
|
|
return $this;
|
|
}
|
|
|
|
final public function getViewer() {
|
|
return $this->viewer;
|
|
}
|
|
|
|
public function isEnabled() {
|
|
return true;
|
|
}
|
|
|
|
abstract public function canPullRef(DoorkeeperObjectRef $ref);
|
|
abstract public function pullRefs(array $refs);
|
|
|
|
public function fillObjectFromData(DoorkeeperExternalObject $obj, $result) {
|
|
}
|
|
|
|
}
|