src/MVC/Module.php
protected function parseModelParams($params = '')
    {
        $db_config_params = '';
        if ($params) {
            $db_config_params = $params;
        } else {
            static $default_db_config = '';
            if ($default_db_config === '') {
                $default_db_config = $this->getConfig()->get('sys', 'default_db');
            }

            if ($default_db_config) {
                $db_config_params = $default_db_config;
            }
        }

        if ($db_config_params) {
            if (strpos($db_config_params, ':') === false) {
                throw new CoreException("数据库参数配置格式不正确: {$db_config_params}");
            }

            list($model_type, $model_name) = explode(':', $db_config_params);
        } else {
            $model_name = 'db';
            $model_type = 'mysql';
        }

        static $cache;
        if (!isset($cache[$model_type][$model_name])) {
            $databaseConfig = $this->databaseConfig();
            $model_config = $databaseConfig->get($model_type, $model_name);
            if (empty($model_config)) {
                throw new CoreException("未配置的Model: {$model_type}:{$model_name}");
            }

            $cache[$model_type][$model_name] = array(
                'model_name' => $model_name,
                'model_type' => $model_type,
                'model_config' => $model_config,
            );
        }

        return $cache[$model_type][$model_name];
    }
protected function parseModelParams($params = '')
    {
        $db_config_params = '';
        if ($params) {
            $db_config_params = $params;
        } else {
            static $default_db_config = '';
            if ($default_db_config === '') {
                $default_db_config = $this->getConfig()->get('sys', 'default_db');
            }

            if ($default_db_config) {
                $db_config_params = $default_db_config;
            }
        }

        if ($db_config_params) {
            if (strpos($db_config_params, ':') === false) {
                throw new CoreException("数据库参数配置格式不正确: {$db_config_params}");
            }

            list($model_type, $model_name) = explode(':', $db_config_params);
        } else {
            $model_name = 'db';
            $model_type = 'mysql';
        }

        static $cache;
        if (!isset($cache[$model_type][$model_name])) {
            $databaseConfig = $this->databaseConfig();
            $model_config = $databaseConfig->get($model_type, $model_name);
            if (empty($model_config)) {
                throw new CoreException("未配置的Model: {$model_type}:{$model_name}");
            }

            $cache[$model_type][$model_name] = array(
                'model_name' => $model_name,
                'model_type' => $model_type,
                'model_config' => $model_config,
            );
        }

        return $cache[$model_type][$model_name];
    }
解析指定model的类型和参数

@param string $params
@return array
@throws CoreException