Changeset View
Changeset View
Standalone View
Standalone View
src/applications/doorkeeper/bridge/DoorkeeperBridge.php
<?php | <?php | ||||
abstract class DoorkeeperBridge extends Phobject { | abstract class DoorkeeperBridge extends Phobject { | ||||
private $viewer; | private $viewer; | ||||
private $context = array(); | |||||
private $throwOnMissingLink; | private $throwOnMissingLink; | ||||
public function setThrowOnMissingLink($throw_on_missing_link) { | public function setThrowOnMissingLink($throw_on_missing_link) { | ||||
$this->throwOnMissingLink = $throw_on_missing_link; | $this->throwOnMissingLink = $throw_on_missing_link; | ||||
return $this; | return $this; | ||||
} | } | ||||
final public function setViewer($viewer) { | final public function setViewer($viewer) { | ||||
$this->viewer = $viewer; | $this->viewer = $viewer; | ||||
return $this; | return $this; | ||||
} | } | ||||
final public function getViewer() { | final public function getViewer() { | ||||
return $this->viewer; | return $this->viewer; | ||||
} | } | ||||
final public function setContext($context) { | |||||
$this->context = $context; | |||||
return $this; | |||||
} | |||||
final public function getContextProperty($key, $default = null) { | |||||
return idx($this->context, $key, $default); | |||||
} | |||||
public function isEnabled() { | public function isEnabled() { | ||||
return true; | return true; | ||||
} | } | ||||
abstract public function canPullRef(DoorkeeperObjectRef $ref); | abstract public function canPullRef(DoorkeeperObjectRef $ref); | ||||
abstract public function pullRefs(array $refs); | abstract public function pullRefs(array $refs); | ||||
public function fillObjectFromData(DoorkeeperExternalObject $obj, $result) { | public function fillObjectFromData(DoorkeeperExternalObject $obj, $result) { | ||||
Show All 12 Lines |