I am trying to understand how OpenCart's code works. The following code is defined in index.php
(file attached) in OpenCart's mysite.com/admin/ folder. Could you please explain what the following code actually does ? I would like to know how it actually works.
I also have attached loader.php
and registry.php
under their respective folder.
// Registry
$registry = new Registry();
// Loader
$loader = new Loader($registry);
$registry->set('load', $loader);
link to mysite.com admin folder zip
Though the following question is not similar to my question but still it touches similar point: Opencart meta title include store name
// Registry
$registry = new Registry(); // Loads registry class from /system/engine/registry.php
// Loader
$loader = new Loader($registry); // Loads Loader class from /system/engine/loader.php
$registry->set('load', $loader); // Assigns the class to the registry allowing global use in other classes that use the registry object
Opencart's coding logic is MVC+L (Language) model.
Not for the latest version, but you can learn most of the details about workflow here ; http://www.packtpub.com/article/opencart-layout-structure