I don't know if I can ask about CMSMadeSimple here or not but here goes. I've seen other CMS and framework questions.
I am studying the code of CMSMS so that I can learn about making my own CMS. I think this is really a php and design question but here:
http://phpxref.com/xref/cmsmadesimple/nav.html?_functions/index.html
under CMSModule which is the class all have to inherit from they have this code:
class CMSModule
479 {
480 /**
481 * ------------------------------------------------------------------
482 * Initialization Functions and parameters
483 * ------------------------------------------------------------------
484 */
485 var $cms;
486 var $curlang;
487 var $langhash;
488 var $params;
.....
509 function CMSModule()
510 {
511 global $gCms;
512 $this->cms =& $gCms;
513 $this->config =& $gCms->GetConfig();
514
What is that last part saying? I don't understand it. Especially when lower in the class it has:
753 /**
754 * Returns the cms->config object as a reference
755 */
756 function & GetConfig()
757 {
758 global $gCms;
759 $config = &$gCms->GetConfig();
760 return $config;
761 }
762
763 /**
764 * Returns the cms->db object as a reference
765 */
766 function & GetDb()
767 {
768 global $gCms;
769 $db = &$gCms->GetDb();
770 return $db;
771 }
772
These look like they almost do nothing or that they keep calling themself forever....with no real db stuff to boot.
I am hoping to understand the design here with all the calls by reference.
Thank you.