public function addSubsidiaryClass($name, $config)
    {
        if (!is_string($name) || empty($name)) {
            throw new InvalidConfigException('Subsidiary name not specified.');
        }
        $name = strtolower($name);
        if (!is_array($config)) {
            if (is_string($config) && !empty($config)) {
                $this->subsidiaryMap[$name] = ['class' => $config];
            } else {
                throw new InvalidConfigException('Subsidiary class not specified.');
            }
        } else {
            if (isset($config['class']) && class_exists($config['class'])) {
                $this->subsidiaryMap[$name] = $config;
            } else {
                throw new InvalidConfigException('Subsidiary class not specified.');
            }
        }
        return true;
    }