/** * @return Gpf_Rpc_CachedResponse */ public static function getInstance() { if (self::$instance === null) { self::$instance = new Gpf_Rpc_CachedResponse(); } return self::$instance; }
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); } } }
protected function renderAffiliatePanelRequest() { $panel = new Pap_Merchants_Config_AffiliatePanel(); Gpf_Rpc_CachedResponse::add($panel->loadTreeNoRpc(), 'Pap_Merchants_Config_AffiliatePanel', 'loadTree'); }
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"); }
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"); }
protected function renderSideBarRequest() { Gpf_Rpc_CachedResponse::add($this->windowManager->loadSideBarNoRpc(), 'Gpf_Desktop_WindowManager', 'loadSideBar'); }
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()); }
public final function render() { $html = $this->renderHtml(); Gpf_Rpc_CachedResponse::add($this->getWidgetResponse(), get_class($this), 'getWidget'); return '<div id="' . $this->getCode() . '">' . $html . '</div>'; }
private function addCountriesRequest() { $countryData = new Gpf_Country_CountryData(); Gpf_Rpc_CachedResponse::add($countryData->getRows(new Gpf_Rpc_Params()), 'Gpf_Country_CountryData', 'getRows'); }