| @@ 5-20 (lines=16) @@ | ||
| 2 | ||
| 3 | namespace Talal\Exporter\Output; |
|
| 4 | ||
| 5 | class Apache extends Output |
|
| 6 | { |
|
| 7 | /** |
|
| 8 | * @inheritdoc |
|
| 9 | */ |
|
| 10 | public function generate() : string |
|
| 11 | { |
|
| 12 | $output = ''; |
|
| 13 | ||
| 14 | foreach ($this->keys as $key => $match) { |
|
| 15 | $output .= sprintf('SetEnv %s "%s"', $match, $this->values[$key]) . PHP_EOL; |
|
| 16 | } |
|
| 17 | ||
| 18 | return rtrim($output, PHP_EOL); |
|
| 19 | } |
|
| 20 | } |
|
| 21 | ||
| @@ 5-20 (lines=16) @@ | ||
| 2 | ||
| 3 | namespace Talal\Exporter\Output; |
|
| 4 | ||
| 5 | class Nginx extends Output |
|
| 6 | { |
|
| 7 | /** |
|
| 8 | * @inheritdoc |
|
| 9 | */ |
|
| 10 | public function generate() : string |
|
| 11 | { |
|
| 12 | $output = ''; |
|
| 13 | ||
| 14 | foreach ($this->keys as $key => $match) { |
|
| 15 | $output .= sprintf('fastcgi_param %s "%s";', $match, $this->values[$key]) . PHP_EOL; |
|
| 16 | } |
|
| 17 | ||
| 18 | return rtrim($output, PHP_EOL); |
|
| 19 | } |
|
| 20 | } |
|
| 21 | ||
| @@ 5-20 (lines=16) @@ | ||
| 2 | ||
| 3 | namespace Talal\Exporter\Output; |
|
| 4 | ||
| 5 | class Bash extends Output |
|
| 6 | { |
|
| 7 | /** |
|
| 8 | * @inheritdoc |
|
| 9 | */ |
|
| 10 | public function generate() : string |
|
| 11 | { |
|
| 12 | $output = ''; |
|
| 13 | ||
| 14 | foreach ($this->keys as $key => $match) { |
|
| 15 | $output .= sprintf('export %s="%s"', $match, $this->values[$key]) . PHP_EOL; |
|
| 16 | } |
|
| 17 | ||
| 18 | return rtrim($output, PHP_EOL); |
|
| 19 | } |
|
| 20 | } |
|
| 21 | ||