Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | public function newPhutilWorkflow() { | ||||
$specs = mpull($arguments, 'getPhutilSpecification'); | $specs = mpull($arguments, 'getPhutilSpecification'); | ||||
$phutil_workflow = id(new ArcanistPhutilWorkflow()) | $phutil_workflow = id(new ArcanistPhutilWorkflow()) | ||||
->setName($this->getWorkflowName()) | ->setName($this->getWorkflowName()) | ||||
->setWorkflow($this) | ->setWorkflow($this) | ||||
->setArguments($specs); | ->setArguments($specs); | ||||
$information = $this->getWorkflowInformation(); | $information = $this->getWorkflowInformation(); | ||||
if ($information !== null) { | |||||
if (!($information instanceof ArcanistWorkflowInformation)) { | |||||
throw new Exception( | |||||
pht( | |||||
'Expected workflow ("%s", of class "%s") to return an '. | |||||
'"ArcanistWorkflowInformation" object from call to '. | |||||
'"getWorkflowInformation()", got %s.', | |||||
$this->getWorkflowName(), | |||||
get_class($this), | |||||
phutil_describe_type($information))); | |||||
} | |||||
} | |||||
if ($information) { | if ($information) { | ||||
$synopsis = $information->getSynopsis(); | $synopsis = $information->getSynopsis(); | ||||
if (strlen($synopsis)) { | if (strlen($synopsis)) { | ||||
$phutil_workflow->setSynopsis($synopsis); | $phutil_workflow->setSynopsis($synopsis); | ||||
} | } | ||||
$examples = $information->getExamples(); | $examples = $information->getExamples(); | ||||
if ($examples) { | if ($examples) { | ||||
▲ Show 20 Lines • Show All 2,113 Lines • ▼ Show 20 Lines | /* -( Phabricator Repositories )------------------------------------------- */ | ||||
final public function getToolsetKey() { | final public function getToolsetKey() { | ||||
return $this->getToolset()->getToolsetKey(); | return $this->getToolset()->getToolsetKey(); | ||||
} | } | ||||
final public function getConfig($key) { | final public function getConfig($key) { | ||||
return $this->getConfigurationSourceList()->getConfig($key); | return $this->getConfigurationSourceList()->getConfig($key); | ||||
} | } | ||||
final public function canHandleSignal($signo) { | public function canHandleSignal($signo) { | ||||
return false; | return false; | ||||
} | } | ||||
public function handleSignal($signo) { | |||||
return; | |||||
} | |||||
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); | ||||
} | } | ||||
} | } |