Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | abstract class ArcanistWorkflow extends Phobject { | ||||
| private $changeCache = array(); | private $changeCache = array(); | ||||
| private $conduitEngine; | private $conduitEngine; | ||||
| private $toolset; | private $toolset; | ||||
| private $runtime; | private $runtime; | ||||
| private $configurationEngine; | private $configurationEngine; | ||||
| private $configurationSourceList; | private $configurationSourceList; | ||||
| private $viewer; | |||||
| private $hardpointEngine; | private $hardpointEngine; | ||||
| private $symbolEngine; | |||||
| private $promptMap; | private $promptMap; | ||||
| final public function setToolset(ArcanistToolset $toolset) { | final public function setToolset(ArcanistToolset $toolset) { | ||||
| $this->toolset = $toolset; | $this->toolset = $toolset; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final public function getToolset() { | final public function getToolset() { | ||||
| ▲ Show 20 Lines • Show All 2,205 Lines • ▼ Show 20 Lines | /* -( Phabricator Repositories )------------------------------------------- */ | ||||
| } | } | ||||
| final public function newCommand(PhutilExecutableFuture $future) { | final public function newCommand(PhutilExecutableFuture $future) { | ||||
| return id(new ArcanistCommand()) | return id(new ArcanistCommand()) | ||||
| ->setLogEngine($this->getLogEngine()) | ->setLogEngine($this->getLogEngine()) | ||||
| ->setExecutableFuture($future); | ->setExecutableFuture($future); | ||||
| } | } | ||||
| final protected function loadHardpoints( | final public function loadHardpoints( | ||||
| $objects, | $objects, | ||||
| $requests) { | $requests) { | ||||
| if (!is_array($objects)) { | if (!is_array($objects)) { | ||||
| $objects = array($objects); | $objects = array($objects); | ||||
| } | } | ||||
| if (!is_array($requests)) { | if (!is_array($requests)) { | ||||
| ▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | if (!$prompt) { | ||||
| 'generate any prompt with that name in "newPrompts()".', | 'generate any prompt with that name in "newPrompts()".', | ||||
| get_class($this), | get_class($this), | ||||
| $key)); | $key)); | ||||
| } | } | ||||
| return clone $prompt; | return clone $prompt; | ||||
| } | } | ||||
| final protected function getSymbolEngine() { | |||||
| if ($this->symbolEngine === null) { | |||||
| $this->symbolEngine = $this->newSymbolEngine(); | |||||
| } | |||||
| return $this->symbolEngine; | |||||
| } | |||||
| private function newSymbolEngine() { | |||||
| return id(new ArcanistSymbolEngine()) | |||||
| ->setWorkflow($this); | |||||
| } | |||||
| final protected function getViewer() { | |||||
| if (!$this->viewer) { | |||||
| $viewer = $this->getSymbolEngine() | |||||
| ->loadUserForSymbol('viewer()'); | |||||
| // TODO: Deal with anonymous stuff. | |||||
| if (!$viewer) { | |||||
| throw new Exception(pht('No viewer!')); | |||||
| } | |||||
| $this->viewer = $viewer; | |||||
| } | |||||
| return $this->viewer; | |||||
| } | |||||
| } | } | ||||