mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
27 lines
540 B
PHP
27 lines
540 B
PHP
<?php
|
|
|
|
namespace Alchemy\Docker\Plugins\Command;
|
|
|
|
function setupStreaming()
|
|
{
|
|
ini_set('output_buffering', 'off');
|
|
ini_set('zlib.output_compression', false);
|
|
if (function_exists('apache_setenv')) {
|
|
apache_setenv('no-gzip', '1');
|
|
apache_setenv('dont-vary', '1');
|
|
}
|
|
}
|
|
|
|
setupStreaming();
|
|
|
|
abstract class SubCommand
|
|
{
|
|
static public function run($cmd)
|
|
{
|
|
system($cmd, $return);
|
|
if (0 !== $return) {
|
|
throw new \Exception(sprintf('Error %d: %s', $return, $cmd));
|
|
}
|
|
}
|
|
}
|