コード例 #1
0
ファイル: Connection.php プロジェクト: adrianthedev/remote
 /**
  * Get the gateway implementation.
  *
  * @return \Illuminate\Remote\GatewayInterface
  * @throws \RuntimeException
  */
 public function getGateway()
 {
     if (!$this->gateway->connected() && !$this->gateway->connect($this->username)) {
         throw new \RuntimeException("Unable to connect to remote server.");
     }
     return $this->gateway;
 }
コード例 #2
0
 /**
  * Get the exit status of the last command.
  *
  * @return int|bool
  */
 public function status()
 {
     return $this->gateway->status();
 }