/**
  * @return Gpf_Rpc_CachedResponse
  */
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new Gpf_Rpc_CachedResponse();
     }
     return self::$instance;
 }
Esempio n. 2
0
 public function addToCache($allowedTemplates)
 {
     $service = new Gpf_Templates_TemplateService();
     foreach ($allowedTemplates as $templateName) {
         if ($this->existTemplate($templateName)) {
             Gpf_Rpc_CachedResponse::add($service->getTemplateNoRpc($templateName), 'Gpf_Templates_TemplateService', 'getTemplate', $templateName);
         }
     }
 }
Esempio n. 3
0
 protected function renderAffiliatePanelRequest() {
     $panel = new Pap_Merchants_Config_AffiliatePanel();
     Gpf_Rpc_CachedResponse::add($panel->loadTreeNoRpc(),
     'Pap_Merchants_Config_AffiliatePanel', 'loadTree');
 }
Esempio n. 4
0
 public function initCachedData(Gpf_ModuleBase $module) {
     Gpf_Rpc_CachedResponse::addById(Gpf_Country_Countries::getEncodedCountries(), 'countryData');
 }
 protected function renderLanguagesRequest()
 {
     $languages = Gpf_Lang_Languages::getInstance();
     Gpf_Rpc_CachedResponse::add($languages->getActiveLanguagesNoRpc(), "Gpf_Lang_Languages", "getActiveLanguages");
 }
Esempio n. 6
0
 protected function initCachedData()
 {
     parent::initCachedData();
     Gpf_Rpc_CachedResponse::addById(Gpf_Install_Manager::getInstance()->getScenarioDescription(), self::SCENARIO);
     Gpf_Rpc_CachedResponse::addById(Gpf_Install_Manager::getInstance()->getScenarioSteps(), self::SCENARIO_STEPS);
 }
 protected function renderApplicationSettingsRequest() {
     $settings = new Pap_LoginApplicationSettings();
     Gpf_Rpc_CachedResponse::add($settings->getSettingsNoRpc(), "Pap_LoginApplicationSettings", "getSettings");
 }
Esempio n. 8
0
 protected function renderSideBarRequest() {
     Gpf_Rpc_CachedResponse::add($this->windowManager->loadSideBarNoRpc(),
         'Gpf_Desktop_WindowManager', 'loadSideBar');
 }
Esempio n. 9
0
 protected function assignTemplateVariables(Gpf_Templates_Template $template)
 {
     $template->assign('title', $this->getTitle());
     $template->assign('metaDescription', $this->getMetaDescription());
     $template->assign('metaKeywords', $this->getMetaKeywords());
     $template->assign('cachedData', Gpf_Rpc_CachedResponse::render());
     $template->assign('stylesheets', $this->styleSheets);
     $template->assign('jsResources', Gpf_Contexts_Module::getContextInstance()->getJsResources());
     $template->assign('jsScripts', Gpf_Contexts_Module::getContextInstance()->getJsScripts());
     $template->assign('body', $this->body);
     $template->assign('faviconUrl', $this->getFaviconUrl());
 }
Esempio n. 10
0
 public final function render()
 {
     $html = $this->renderHtml();
     Gpf_Rpc_CachedResponse::add($this->getWidgetResponse(), get_class($this), 'getWidget');
     return '<div id="' . $this->getCode() . '">' . $html . '</div>';
 }
Esempio n. 11
0
	private function addCountriesRequest() {
		$countryData = new Gpf_Country_CountryData();
		Gpf_Rpc_CachedResponse::add($countryData->getRows(new Gpf_Rpc_Params()), 'Gpf_Country_CountryData', 'getRows');
	}