/** * instantiate return a singleton object for the Debug class * * The method return a new object if it does not exist, otherwise return the existing object * @access public * @return Debug */ public static function instantiate() { if (self::$s_oInstance === null) { self::$s_oInstance = new BCRiantoInfoObject(); } if (self::$s_oxmlBCRiantoDoc === null) { self::$s_oxmlBCRiantoDoc = new DOMDocument(); self::$s_oxmlBCRiantoDoc->load("xml/contact.xml"); } return self::$s_oInstance; }
/** * toon Toont de gegevens op het scherm. maakt gebruik van Smarty templates * * @return void */ public function toon() { // creeer een Smarty-object $oSmarty = new SmartyWrapper(); $oSmarty->assign('sTitel', $this->m_sTitel); $oSmarty->assign('sHTML', $this->m_sHTML); $oBCRiantoInfo = BCRiantoInfoObject::instantiate(); $aContactInfo = $oBCRiantoInfo->getContactInfo(); $aAfbeeldingenCarousel = $oBCRiantoInfo->getAfbeeldingenCarousel(); $aJarigenVanDeMaand = $oBCRiantoInfo->getJarigenVanDeMaand(); if (is_object($this->m_oMenu)) { $oSmarty->assign('aMenu', $this->m_oMenu->getData()); } $sNaam = ''; $oSmarty->assign('aContact', $aContactInfo); $oSmarty->assign('aAfbeeldingen', $aAfbeeldingenCarousel); $oSmarty->assign('aJarigenVanDeMaand', $aJarigenVanDeMaand); $oSmarty->assign('sGebruikerNaam', $sNaam); $oSmarty->assign('aScripts', $this->m_aScripts); $oSmarty->assign('aData', $this->m_aData); if (strlen($this->m_sTemplate) > 0) { $oSmarty->display($this->m_sTemplate); } else { throw new WebsiteException('Geen template gedefinieerd'); } }