20 lines
325 B
PHP
20 lines
325 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Runner;
|
|
|
|
use Symfony\Component\Process\Process;
|
|
|
|
class Local implements RunnerInterface
|
|
{
|
|
public function execute($command): string
|
|
{
|
|
$process = new Process([
|
|
$command
|
|
]);
|
|
$process->run();
|
|
return $process->getOutput();
|
|
}
|
|
}
|