PHP code example of gitbugr / supervisor-configuration
1. Go to this page and download the library: Download gitbugr/supervisor-configuration library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gitbugr / supervisor-configuration example snippets
$config = new \Supervisor\Configuration\Configuration;
$renderer = new \Indigo\Ini\Renderer;
$section = new \Supervisor\Configuration\Section\Supervisord(['identifier' => 'supervisor']);
$config->addSection($section);
$section = new \Supervisor\Configuration\Section\Program('test', ['command' => 'cat']);
$config->addSection($section);
echo $renderer->render($config->toArray());
$section = new \Supervisor\Configuration\Section\Program('test', ['command' => 'cat']);
$loader = new \Supervisor\Configuration\Loader\IniFileLoader('/etc/supervisor/supervisord.conf');
$configuration = $loader->load();
$configuration = new \Supervisor\Configuration\Configuration;
// Modify configuration...
$writer = new \Supervisor\Configuration\Writer\IniFileWriter('/etc/supervisor/supervisord.conf');
$writer->write($configuration);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.