<commit_before><?php

/*
 * This file is part of the Indigo Supervisor package.
 *
 * (c) Indigo Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Supervisor;

/**
 * Supervisor API
 *
 * @author <NAME> <<EMAIL>>
 */
class Supervisor
{
    /**
     * Service states
     */
    const SHUTDOWN   = -1;
    const RESTARTING = 0;
    const RUNNING    = 1;
    const FATAL      = 2;

    /**
     * @var Connector
     */
    protected $connector;

    /**
     * @param Connector $connector
     */
    public function __construct(Connector $connector)
    {
        $this->connector = $connector;
    }

    /**
     * Checks whether connecting to a local Supervisor instance
     *<commit_msg>Adds method declarations to Supervisor class<commit_after><?php

/*
 * This file is part of the Indigo Supervisor package.
 *
 * (c) Indigo Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Supervisor;

/**
 * Supervisor API
 *
 * @method string  getAPIVersion()
 * @method string  getSupervisorVersion()
 * @method string  getIdentification()
 * @method array   getState()
 * @method integer getPID()
 * @method string  readLog(integer $offset, integer $limit)
 * @method boolean clearLog()
 * @method boolean shutdown()
 * @method boolean restart()
 * @method array   getProcessInfo(string $processName)
 * @method array   getAllProcessInfo()
 * @method boolean startProcess(string $name, boolean $wait = true)
 * @method boolean startAllProcesses(boolean $wait = true)
 * @method boolean startProcessGroup(string $name, boolean $wait = true)
 * @method boolean stopProcess(string $name, boolean $wait = true)
 * @method boolean stopAllProcesses(boolean $wait = true)
 * @method boolean stopProcessGroup(string $name, boolean $wait = true)
 * @method boolean sendProcessStdin(string $name, string $chars)
 * @method boolean addProcessGroup(string $name)
 * @method boolean removeProcessGroup(string $name)
 * @method string  readProcessStdoutLog(string $name, integer $offset, integer $limit)
 * @method string  readProcessStderrLog(string $name, integer $offset, integer $limit)
 * @method string  tailProcessStdoutLog(string $name, integer $offset, integer $limit)
 * @method string  tailProcessStderrLog(string $name, integer $offset, integer $limit)
 * @method boolean clearProcessLogs(string $name)
 * @method boolean clearAllProcessLogs()
 *
 * @link http://supervisord.org/api.html
 *
 * @author <NAME> <<EMAIL>>
 */
class Supervisor
{
    /**
     * Service states
     */
    const SHUTDOWN   = -1;
    const RESTARTING = 0;
    const RUNNING    = 1;
    const FATAL      = 2;

    /**
     * @var Connector
     */
    protected $connector;

    /**
     * @param Connector $connector
     */
    public function __construct(Connector $connector)
    {
        $this->connector = $connector;
    }

    /**
     * Checks whether connecting to a local Supervisor instance
     *
{'fraction_non_alphanumeric': 0.10772683552420648, 'fraction_numerical': 0.0025649246553382495, 'mean_word_length': 3.3636363636363638, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1412674', 'n_tokens_mistral': 896, 'n_tokens_neox': 883, 'n_words': 289}