public function __construct()
 {
     try {
         $this->set('errorMessage', '');
         $this->loadConfig();
         $this->loadSecurity();
         $this->loadExternalVariables();
         $this->renderPage();
     } catch (\Exception $e) {
         $this->set('errorMessage', 'ERROR : ' . $e->getMessage() . "\n" . ' <!-- <br><pre>' . "\n" . $this->getExceptionTraceAsString($e) . '</pre> -->');
         // log to logging module
         if ($this->__config->get('loggingEnabled')) {
             \PAJ\Library\Log\Helper::logThis('EXCEPTION : ' . $e->getMessage(), $this->__config->get('applicationName'), true, $this->__config->get('logFilePath') . 'log', false);
         }
         if (php_sapi_name() != 'cli') {
             $this->set('requestedpage', 'frontend_home');
             $this->renderPage();
         } else {
             echo $e->getMessage() . "\n";
         }
         exit;
     }
 }
 /**
  * __toString function.
  * 
  * @access public
  * @return void
  */
 public function __toString()
 {
     $_html = $this->get('pageHtml');
     // log page views to logging module
     if ($this->__config->get('loggingEnabled')) {
         \PAJ\Library\Log\Helper::logThis('PAGE : ' . $this->get('requestedsubpage') . ' - ' . $_SERVER[REQUEST_URI], $this->__config->get('applicationName'), false);
     }
     // return and minify DEV true/false, ULTRA true/false
     return $this->minify($_html, true, false);
 }