mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-22 03:02:20 +00:00
32 lines
688 B
PHP
32 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Facades;
|
|
|
|
use App\Models\Server;
|
|
use App\Support\Testing\SSHFake;
|
|
use Illuminate\Support\Facades\Facade as FacadeAlias;
|
|
|
|
/**
|
|
* Class SSH
|
|
*
|
|
* @method static \App\Helpers\SSH init(Server $server, string $asUser = null)
|
|
* @method static setLog(string $logType, int $siteId = null)
|
|
* @method static connect()
|
|
* @method static exec($commands, string $log = '', int $siteId = null)
|
|
* @method static disconnect()
|
|
*/
|
|
class SSH extends FacadeAlias
|
|
{
|
|
public static function fake(): SSHFake
|
|
{
|
|
static::swap($fake = new SSHFake());
|
|
|
|
return $fake;
|
|
}
|
|
|
|
protected static function getFacadeAccessor(): string
|
|
{
|
|
return 'ssh';
|
|
}
|
|
}
|