/**
* Method to load and return a model object.
*
* @param string $name The name of the model.
* @param string $prefix Optional model prefix.
* @param array $config Optional configuration array for the model.
*
* @return ModelInterface The model object
*
* @since 3.10.0
* @throws \Exception
*/
public function createModel($name, $prefix = '', array $config = [])
{
// Clean the model name
$modelName = preg_replace('/[^A-Z0-9_]/i', '', $name);
$classPrefix = preg_replace('/[^A-Z0-9_]/i', '', $prefix);
return BaseDatabaseModel::getInstance($modelName, $classPrefix, $config);
}