| 1 | <?php |
||
| 8 | abstract class SshRebooter implements ServerController |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Session |
||
| 12 | */ |
||
| 13 | protected $session; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Gets the SSH session executor |
||
| 17 | * @return \Ssh\Exec |
||
| 18 | */ |
||
| 19 | public function getExec(){ |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Throws an Exception because you cannot boot a powered down machine from ssh |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function boot(){ |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Executes a Reboot command |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function reboot(){ |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Executes a Shutdown command |
||
| 42 | * @return void |
||
| 43 | */ |
||
| 44 | public function shutdown(){ |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Gets the value of session. |
||
| 51 | * |
||
| 52 | * @return Session |
||
| 53 | */ |
||
| 54 | public function getSession() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Sets the value of session. |
||
| 61 | * |
||
| 62 | * @param Session $session the session |
||
| 63 | * @return self |
||
| 64 | */ |
||
| 65 | public function setSession(Session $session) |
||
| 70 | } |