- update for PHP 5.4 compatibility

- reformat source to PSR-2 standard
This commit is contained in:
Uwe.Tews@googlemail.com
2013-07-14 22:15:45 +00:00
parent f99e6a83ce
commit 00ccae8857
126 changed files with 5232 additions and 5186 deletions

View File

@@ -19,8 +19,8 @@
* @property Smarty_Config_Compiled $compiled
* @ignore
*/
class Smarty_Internal_Config {
class Smarty_Internal_Config
{
/**
* Samrty instance
*
@@ -72,8 +72,8 @@ class Smarty_Internal_Config {
* Constructor of config file object
*
* @param string $config_resource config file resource name
* @param Smarty $smarty Smarty instance
* @param object $data object for config vars storage
* @param Smarty $smarty Smarty instance
* @param object $data object for config vars storage
*/
public function __construct($config_resource, $smarty, $data = null)
{
@@ -117,6 +117,7 @@ class Smarty_Internal_Config {
$_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
}
$_compile_dir = $this->smarty->getCompileDir();
return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php';
}
@@ -163,6 +164,7 @@ class Smarty_Internal_Config {
$this->compiled_config = file_get_contents($this->getCompiledFilepath());
}
}
return $this->compiled_config;
}
@@ -202,8 +204,8 @@ class Smarty_Internal_Config {
/**
* load config variables
*
* @param mixed $sections array of section names, single section or null
* @param object $scope global,parent or local
* @param mixed $sections array of section names, single section or null
* @param object $scope global,parent or local
*/
public function loadConfigVars($sections = null, $scope = 'local')
{
@@ -257,8 +259,8 @@ class Smarty_Internal_Config {
/**
* set Smarty property in template context
*
* @param string $property_name property name
* @param mixed $value value
* @param string $property_name property name
* @param mixed $value value
* @throws SmartyException if $property_name is not valid
*/
public function __set($property_name, $value)
@@ -267,6 +269,7 @@ class Smarty_Internal_Config {
case 'source':
case 'compiled':
$this->$property_name = $value;
return;
}
@@ -276,7 +279,7 @@ class Smarty_Internal_Config {
/**
* get Smarty property in template context
*
* @param string $property_name property name
* @param string $property_name property name
* @throws SmartyException if $property_name is not valid
*/
public function __get($property_name)
@@ -287,10 +290,12 @@ class Smarty_Internal_Config {
throw new SmartyException("Unable to parse resource name \"{$this->config_resource}\"");
}
$this->source = Smarty_Resource::config($this);
return $this->source;
case 'compiled':
$this->compiled = $this->source->getCompiled($this);
return $this->compiled;
}
@@ -298,5 +303,3 @@ class Smarty_Internal_Config {
}
}
?>