getCustomPath(); $this->setTemplateDir( array('' => 'plantillas', 'custom' => "{$customDirname}/plantillas", 'igep' => 'igep/plantillas') ); $this->setCompileDir( $configuration->getTemplatesCompilationDir() ); $this->setPluginsDir( array('smarty/plugins', "{$customDirname}/smarty/plugins", SMARTY_DIR.'gvhplugins' , SMARTY_DIR.'plugins') ); $this->setConfigDir( array('igep' => 'igep/lang', 'custom' => "{$customDirname}/lang", '' => 'lang') ); $this->setCaching( Smarty::CACHING_OFF ); //$this->debug_tpl = SMARTY_DIR . 'debug.tpl' ; $this->setDebugging( false ); if( !$configuration->getSmartyCompileCheck() ) { $this->setCompileCheck( false ); } // Sólo para entorno de desarrollo: Permite usar 'SMARTY_DEBUG' como variable en la URL para mostrar {debug} de Smarty. $entorno = trim(strtoupper(ConfigFramework::getConfig()->getProperty('p_entorno'))); if ($entorno == 'DESARROLLO' || $entorno == 'LOCALHOST') { $this->debugging_ctrl = 'URL'; } /* Instanciamos la clase que gestiona los componentes web */ $this->igepPlugin = new IgepPlugin(); //PARA TEST: //$this->error_reporting = "E_ALL & ~E_NOTICE & ~E_STRICT"; //$this->debug_tpl = SMARTY_DIR . 'debug.tpl'; //$this->setDefaultResourceType('extendsall'); //$this->testInstall(); }//FIN funcion Smarty_Phrame /** * {@inheritDoc} * @see Smarty_Internal_Data::configLoad($config_file, $sections, $scope) */ public function configLoad( $config_file, $sections = null, $scope = 'global') { // Si no tenemos un array, ejecutamos el método normal // if( !isset($this->config_dir) || !is_array($this->config_dir) ) { return parent::configLoad( $config_file, $sections, $scope ); } // Si tenemos un array, cargamos los ficheros de configuración de igep + custom + app, // en ese orden ya que las variables conservarán el último valor que se les haya dado. // foreach( $this->config_dir as $key => $notUsed ) { $file = (empty($key) ? '' : $key . '_' ) . $config_file; parent::configLoad( $file, $sections, $scope ); } }//FIN funcion configLoad /** * {@inheritDoc} * @see SmartyBC::config_load() * @deprecated */ public function config_load( $file, $section = null, $scope = 'global' ) { $this->ConfigLoad( $file, $section, $scope ); }//FIN funcion config_load /** * clears compiled version of specified template resource, * or all compiled template files if one is not specified. * This function is for advanced use only, not normally needed. * * @deprecated * @param string $tpl_file * @param string $compile_id * @param string $exp_time * * @return boolean results of {@link smarty_core_rm_auto()} */ public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) { return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time); } /** * Metodo extractLangLabelFromConfig * * Extrae la cadena localizada (i18N) correspondiente a la etiqueta en el idioma del usuario, desde las variables de configuración de Smarty * * @static * @param Smarty_Internal_Template $template * @param string $claseManejadora * @param string $label * @return string */ public static function extractLangLabelFromConfig( $template, $claseManejadora, $label ) { //$conf = ConfigFramework::getConfig(); //$lang = $conf->getLanguage(); //$template->ConfigLoad( $lang .'.conf', $claseManejadora, 'global' ); $value = null; // Comprobamos si es una etiqueta (ej: '#...#') if( substr($label, 0, 1) == '#' && substr($label, -1) == '#') { // Extraemos la etiqueta desde las variables de configuración de Smarty $value = $template->getConfigVars( substr($label, 1, -1) , true ); } // Si existe, devolvemos el valor extraído, y si no existe, devolvemos el valor de la etiqueta original. return (empty($value) ? $label : $value); }//extractLangLabelFromConfig } //FIN clase Smarty_Phrame /** * Main class with template data structures and methods * * @author Jorge Belenguer * * @property Smarty_Template_Compiled $compiled * @property Smarty_Template_Cached $cached * @property Smarty_Internal_TemplateCompilerBase $compiler * @property mixed|\Smarty_Template_Cached registered_plugins * * The following methods will be dynamically loaded by the extension handler when they are called. * They are located in a corresponding Smarty_Internal_Method_xxxx class * * @method bool mustCompile() * * @package gvHidra * @subpackage Smarty */ class Smarty_Internal_Template_Phrame extends Smarty_Internal_Template { // // Sobreescribimos el tipo phpDoc de la variable '$smarty'. // /** * Global smarty instance * * @var Smarty_Phrame $smarty */ public $smarty = null; } //FIN clase Smarty_Internal_Template_Phrame