mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
init
This commit is contained in:
18
app/SSHCommands/Firewall/CommandContent.php
Executable file
18
app/SSHCommands/Firewall/CommandContent.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\SSHCommands\Firewall;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait CommandContent
|
||||
{
|
||||
public function content(string $os): string
|
||||
{
|
||||
$command = Str::replace('__type__', $this->type, $this->file($os));
|
||||
$command = Str::replace('__protocol__', $this->protocol, $command);
|
||||
$command = Str::replace('__source__', $this->source, $command);
|
||||
$command = Str::replace('__mask__', $this->mask, $command);
|
||||
|
||||
return Str::replace('__port__', $this->port, $command);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user