src/Environaut/Runner/Runner.php
protected function getCheckInstance(array $parameters = array())
    {
        $params = new Parameters($parameters);

        $check_implementor = $params->get(IConfig::PARAM_CLASS, self::DEFAULT_CHECK_IMPLEMENTOR);

        $check = new $check_implementor();

        if (!$check instanceof ICheck) {
            throw new \InvalidArgumentException(
                'The given check class "' . $check_implementor . '" does not implement ICheck.'
            );
        }

        $check->setCommand($this->command);
        $check->setCache($this->readonly_cache);

        $check->setName($params->get(IConfig::PARAM_NAME));
        $check->setGroup($params->get(IConfig::PARAM_GROUP));
        $check->setParameters($params);

        return $check;
    }
protected function getCheckInstance(array $parameters = array())
    {
        $params = new Parameters($parameters);

        $check_implementor = $params->get(IConfig::PARAM_CLASS, self::DEFAULT_CHECK_IMPLEMENTOR);

        $check = new $check_implementor();

        if (!$check instanceof ICheck) {
            throw new \InvalidArgumentException(
                'The given check class "' . $check_implementor . '" does not implement ICheck.'
            );
        }

        $check->setCommand($this->command);
        $check->setCache($this->readonly_cache);

        $check->setName($params->get(IConfig::PARAM_NAME));
        $check->setGroup($params->get(IConfig::PARAM_GROUP));
        $check->setParameters($params);

        return $check;
    }
Returns a new check instance based on the given parameters (from config).

@param array $parameters check definition parameters

@return ICheck instance