Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/ssh/PhabricatorSSHWorkflow.php
| <?php | <?php | ||||
| abstract class PhabricatorSSHWorkflow extends PhabricatorManagementWorkflow { | abstract class PhabricatorSSHWorkflow | ||||
| extends PhutilArgumentWorkflow { | |||||
| private $user; | // NOTE: We are explicitly extending "PhutilArgumentWorkflow", not | ||||
| // "PhabricatorManagementWorkflow". We want to avoid inheriting "getViewer()" | |||||
| // and other methods which assume workflows are administrative commands | |||||
| // like `bin/storage`. | |||||
| private $sshUser; | |||||
| private $iochannel; | private $iochannel; | ||||
| private $errorChannel; | private $errorChannel; | ||||
| private $isClusterRequest; | private $isClusterRequest; | ||||
| private $originalArguments; | private $originalArguments; | ||||
| public function isExecutable() { | public function isExecutable() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function setErrorChannel(PhutilChannel $error_channel) { | public function setErrorChannel(PhutilChannel $error_channel) { | ||||
| $this->errorChannel = $error_channel; | $this->errorChannel = $error_channel; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getErrorChannel() { | public function getErrorChannel() { | ||||
| return $this->errorChannel; | return $this->errorChannel; | ||||
| } | } | ||||
| public function setUser(PhabricatorUser $user) { | public function setSSHUser(PhabricatorUser $ssh_user) { | ||||
| $this->user = $user; | $this->sshUser = $ssh_user; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getUser() { | public function getSSHUser() { | ||||
| return $this->user; | return $this->sshUser; | ||||
| } | } | ||||
| public function setIOChannel(PhutilChannel $channel) { | public function setIOChannel(PhutilChannel $channel) { | ||||
| $this->iochannel = $channel; | $this->iochannel = $channel; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIOChannel() { | public function getIOChannel() { | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||