/** * Assign prepared data into template and display * Could be called by some class which need do page process manually * @see Hush_App_Dispatcher * @param string $tpl_name Passed template name * @return unknown */ public function __done() { // page execute time $this->end_time = microtime(true); $this->_rtime = $this->end_time - $this->start_time; // whether display if (Hush_Debug::showDebug('time')) { $this->debug($this->_rtime, '<span style="color:red">Service Execute Time >>></span>', Hush_Debug::INFO); } // print debug msg $this->_debug->write(); }
/** * Assign prepared data into template and display * Could be called by some class which need do page process manually * @see Hush_App_Dispatcher * @param string $tpl_name Passed template name * @return unknown */ public function __display($tpl_name = null) { // display setted template if ($this->getTemplate()) { $tpl_name = $this->getTemplate(); } // display passed template // TODO : Smarty 3 bug in caching if ($tpl_name && $this->view->templateExists($tpl_name)) { $this->view->display($tpl_name); } // page execute time if (Hush_Debug::showDebug('time')) { $this->end_time = microtime(true); $this->debug(__TPL_ENGINE . '_' . $this->view->getVersion(), '<span style="color:red">Template Engine Version >>></span>', Hush_Debug::INFO); $this->debug($this->end_time - $this->start_time, '<span style="color:red">Page Execute Time >>></span>', Hush_Debug::INFO); $this->debug($this->view->isCached($tpl_name), '<span style="color:red">Page Cached >>></span>', Hush_Debug::INFO); } // print debug msg $this->_debug->write(); }