/**
  * @ a description for the function TemplateFiller->.
  */
 function TemplateFiller($path_templates_dir = null)
 {
     parent::TmplIncluder();
     global $application;
     if ($path_templates_dir != null) {
         $this->TemplateDirPrefix = $path_templates_dir;
     }
     $this->MessageResources =& $application->getInstance('MessageResources');
     $this->prepared_template_cache = CCacheFactory::getCache('temporary', __CLASS__);
     if (!$this->www_address) {
         $this->www_address = $application->getAppIni('HTTP_URL');
         if ($application->getCurrentProtocol() == "https" && $application->getAppIni('HTTPS_URL')) {
             $this->www_address = $application->getAppIni('HTTPS_URL');
         }
     }
     if (!$this->templates_url) {
         //            $this->templates_url = $application->getAppIni('URL_THEME');
         $this->templates_url = $application->getAppIni('URL_TEMPLATES');
         if ($application->getCurrentProtocol() == "https" && $application->getAppIni('HTTPS_URL_TEMPLATES')) {
             $this->templates_url = $application->getAppIni('HTTPS_URL_TEMPLATES');
         }
     }
     if (!$this->site_url) {
         $this->site_url = $application->getAppIni('SITE_URL');
         if ($application->getCurrentProtocol() == "https" && $application->getAppIni('SITE_HTTPS_URL')) {
             $this->site_url = $application->getAppIni('SITE_HTTPS_URL');
         }
     }
 }
 /**
  * TmplFiller class constructor.
  *
  *                                                                              ,
  *                                                      .
  *  . .                       ,                                            .
  */
 function TmplFiller($path_templates_dir = null)
 {
     parent::TmplIncluder();
     //                                                         .
     if ($path_templates_dir != null) {
         $this->TemplateDirPrefix = $path_templates_dir;
     } else {
         switch (modApiFunc('Users', 'getZone')) {
             case "CustomerZone":
                 $this->TemplateDirPrefix = modApiFunc('application', 'getAppIni', 'PATH_USERS_TPLS_VIEWS');
                 break;
             case "AdminZone":
                 $this->TemplateDirPrefix = modApiFunc('application', 'getAppIni', 'PATH_ADMIN_TPLS_VIEWS');
                 break;
             default:
                 _fatal(array("CODE" => "CORE_049"), __CLASS__, __FUNCTION__);
         }
     }
 }