public static function getInstance() { if (!self::$instance) { self::$instance = new Mediateca_Init(); } return self::$instance; }
function mediatecaCreateInstances() { global $mediatecaInit, $mediatecaAdmin, $batchMediateca, $mediatecaRender; //class is singleton $mediatecaInit = Mediateca_Init::getInstance(); //class is singleton $mediatecaAdmin = Mediateca_Admin::getInstance(); $batchMediateca = new Batch_Mediateca(); $mediatecaRender = new Mediateca_Render(); }