I saw controller class use global methods
eg. $this->document->getTitle();
but there is no document object defined in the controller class, i want to know how the getTitle() call as I could not found a class member "document" inside the controller class
also where can i find the controller class get instantiated?
Incorrect. There's a document object from index.php file and admin/index.php file which then gets registered in order to be globalized within the entire catalog and another one within the entire admin.
Code: Select all
// Document
$document = new Document();
$registry->set('document', $document);
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thank you very muchstraightlight wrote:Incorrect. There's a document object from index.php file and admin/index.php file which then gets registered in order to be globalized within the entire catalog and another one within the entire admin.
Code: Select all
// Document $document = new Document(); $registry->set('document', $document);
then I try to understand what index.php doing inside
The index.php is mainly as inclusively considered global.php file mixed with an index definition while we compare with non-CMS platform applications.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 31 guests