vito/app/SSHCommands/Firewall/CommandContent.php
2023-08-04 18:28:04 +02:00

18 lines
469 B
PHP
Executable File

<?php
namespace App\SSHCommands\Firewall;
trait CommandContent
{
public function content(): string
{
return str($this->file())
->replace('__type__', $this->type)
->replace('__protocol__', $this->protocol)
->replace('__source__', $this->source)
->replace('__mask__', $this->mask || $this->mask == 0 ? '/'.$this->mask : '')
->replace('__port__', $this->port)
->toString();
}
}