The OpenCart bootloader class seems inspired by CodeIgniter, but it is not based on it. You can look at the source of OpenCart, see File system/engine/loader.php (line 39).
public function model($model) { $file = DIR_APPLICATION . 'model/' . $model . '.php'; $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model); if (file_exists($file)) { include_once($file); // Right here. Replaces slash by underscore. $this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry)); } else { trigger_error('Error: Could not load model ' . $model . '!'); exit(); } }
You can clearly see that it replaces slashes with underscores and appends 'model_' in front of the model name. This is why you end up with model_catalog_product .
source share