/**
  * postDispatch
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function postDispatch()
 {
     if (isset($this->objCache) && $this->objCache instanceof Zend_Cache_Frontend_Output) {
         if ($this->blnCachingStart === true) {
             $response = $this->getResponse()->getBody();
             $this->getResponse()->setBody(str_replace("<head>", "<head>\r\n  <!-- This is a ZOOLU cached page (" . date('d.m.Y H:i:s') . ") -->", $response));
             $this->getResponse()->outputBody();
             $arrTags = array();
             if ($this->objPage->getIsStartElement(false) == true) {
                 $arrTags[] = 'StartPage';
             }
             $arrTags[] = 'PageType' . $this->objPage->getPageTypeId();
             $this->core->logger->debug($arrTags);
             $this->objCache->end($arrTags);
             exit;
         }
     }
     parent::postDispatch();
 }
 /**
  * postDispatch
  * @author Thomas Schedler <*****@*****.**>
  * @version 1.0
  */
 public function postDispatch()
 {
     if ($this->blnPostDispatch == true) {
         // trigger client specific dispatch helper
         if ($this->core->sysConfig->helpers->client->dispatcher === 'enabled') {
             ClientHelper::get('Dispatcher')->postDispatch($this);
         }
         if (function_exists('tidy_parse_string') && $this->blnCachingOutput == false && $this->getResponse()->getBody() != '') {
             /**
              * Tidy is a binding for the Tidy HTML clean and repair utility which allows 
              * you to not only clean and otherwise manipulate HTML documents, 
              * but also traverse the document tree. 
              */
             $arrConfig = array('indent' => TRUE, 'output-xhtml' => TRUE, 'wrap' => 200);
             $objTidy = tidy_parse_string($this->getResponse()->getBody(), $arrConfig, $this->core->sysConfig->encoding->db);
             $objTidy->cleanRepair();
             $this->getResponse()->setBody($objTidy);
         }
         if (isset($this->objCache) && $this->objCache instanceof Zend_Cache_Frontend_Output) {
             if ($this->blnCachingStart === true) {
                 $response = $this->getResponse()->getBody();
                 $this->getResponse()->setBody(str_replace("<head>", "<head>\r\n      <!-- This is a ZOOLU cached page (" . date('d.m.Y H:i:s') . ") -->", $response));
                 $this->getResponse()->outputBody();
                 $arrTags = array();
                 if ($this->objPage->getIsStartElement(false) == true) {
                     $arrTags[] = 'Start' . ucfirst($this->objPage->getType());
                 }
                 $arrTags[] = ucfirst($this->objPage->getType()) . 'Type_' . $this->objPage->getTypeId();
                 $arrTags[] = ucfirst($this->objPage->getType()) . 'Id_' . $this->objPage->getPageId() . '_' . $this->objPage->getLanguageId();
                 $this->core->logger->debug(var_export($arrTags, true));
                 $this->objCache->end($arrTags);
                 $this->core->logger->debug('... end caching!');
                 exit;
             }
         }
         parent::postDispatch();
     }
 }