vito/app/Facades/SSH.php
2023-08-04 18:28:04 +02:00

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';
}
}