<?php

namespace Comitium5\DesignerBundle\Helper;

/**
 * Class Process
 *
 * @author Carles Gómez <carles@bab-soft.com>
 * @package Comitium5\DesignerBundle\Helper
 */
class Process
{
    /**
     * @param $process
     * @param null $output
     * @param null $return
     */
    public function run($process, $output = null, $return = null)
    {
        exec($process, $output, $return);
    }

    /**
     * @param $process
     * @param null $output
     */
    public function runInBackground($process, $output = null)
    {
        $process = $process . " > /dev/null 2>&1 &";

        $this->run($process, $output);
    }
}
