for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Bldr.io
*
* (c) Aaron Scherer <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE
*/
namespace Bldr\Block\Execute\Service;
use Symfony\Component\Process\Process;
* @author Aaron Scherer <[email protected]>
class BackgroundService
{
* @var Process[] $processes
private $processes = [];
* @param string $name
* @param Process $process
public function addProcess($name, Process $process)
$this->processes[$name] = $process;
}
* @return bool
public function hasProcess($name)
return array_key_exists($name, $this->processes);
* @return Process
public function getProcess($name)
return $this->processes[$name];
public function removeProcess($name)
unset($this->processes[$name]);