move properties into classes where they better belong to

This commit is contained in:
Uwe Tews
2014-12-31 15:44:08 +01:00
parent 2687f36849
commit b013984dfd
3 changed files with 60 additions and 63 deletions

View File

@@ -104,7 +104,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.22-dev/3'; const SMARTY_VERSION = '3.1.22-dev/5';
/** /**
* define variable scopes * define variable scopes
@@ -297,12 +297,6 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var boolean * @var boolean
*/ */
public $allow_ambiguous_resources = false; public $allow_ambiguous_resources = false;
/**
* caching enabled
*
* @var boolean
*/
public $caching = false;
/** /**
* merge compiled includes * merge compiled includes
* *
@@ -315,32 +309,12 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var boolean * @var boolean
*/ */
public $inheritance_merge_compiled_includes = true; public $inheritance_merge_compiled_includes = true;
/**
* cache lifetime in seconds
*
* @var integer
*/
public $cache_lifetime = 3600;
/** /**
* force cache file creation * force cache file creation
* *
* @var boolean * @var boolean
*/ */
public $force_cache = false; public $force_cache = false;
/**
* Set this if you want different sets of cache files for the same
* templates.
*
* @var string
*/
public $cache_id = null;
/**
* Set this if you want different sets of compiled files for the same
* templates.
*
* @var string
*/
public $compile_id = null;
/** /**
* template left-delimiter * template left-delimiter
* *
@@ -429,6 +403,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var int * @var int
*/ */
public $error_reporting = null; public $error_reporting = null;
/** /**
* Internal flag for getTags() * Internal flag for getTags()
* *
@@ -512,12 +487,31 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var string * @var string
*/ */
public $default_config_type = 'file'; public $default_config_type = 'file';
/**
* cached template objects
*
* @var array
*/
public $source_objects = array();
/** /**
* cached template objects * cached template objects
* *
* @var array * @var array
*/ */
public $template_objects = array(); public $template_objects = array();
/**
* enable template resource caching
*
* @var bool
*/
public $resource_caching = true;
/**
* enable template resource caching
*
* @var bool
*/
public $template_resource_caching = false;
/** /**
* check If-Modified-Since headers * check If-Modified-Since headers
* *
@@ -626,12 +620,6 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var array * @var array
*/ */
public $_tag_stack = array(); public $_tag_stack = array();
/**
* self pointer to Smarty object
*
* @var Smarty
*/
public $smarty;
/** /**
* required by the compiler for BC * required by the compiler for BC
* *
@@ -644,6 +632,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var bool * @var bool
*/ */
public $_parserdebug = false; public $_parserdebug = false;
/**#@-*/
/** /**
* Cache of is_file results of loadPlugin() * Cache of is_file results of loadPlugin()

View File

@@ -19,35 +19,18 @@
*/ */
class Smarty_Internal_Template extends Smarty_Internal_TemplateBase class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
{ {
/**
* cache_id
*
* @var string
*/
public $cache_id = null;
/**
* $compile_id
* @var string
*/
public $compile_id = null;
/**
* caching enabled
*
* @var boolean
*/
public $caching = null;
/**
* cache lifetime in seconds
*
* @var integer
*/
public $cache_lifetime = null;
/** /**
* Template resource * Template resource
* *
* @var string * @var string
*/ */
public $template_resource = null; public $template_resource = null;
/**
* Saved template Id
*
* @var null|string
*/
public $templateId = null;
/** /**
* flag if compiled template is invalid and must be (re)compiled * flag if compiled template is invalid and must be (re)compiled
* *
@@ -68,7 +51,6 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
public $properties = array('file_dependency' => array(), public $properties = array('file_dependency' => array(),
'nocache_hash' => '', 'nocache_hash' => '',
'tpl_function' => array(), 'tpl_function' => array(),
'type' => 'compiled',
); );
/** /**
* required plugins * required plugins
@@ -76,12 +58,6 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
* @var array * @var array
*/ */
public $required_plugins = array('compiled' => array(), 'nocache' => array()); public $required_plugins = array('compiled' => array(), 'nocache' => array());
/**
* Global smarty instance
*
* @var Smarty
*/
public $smarty = null;
/** /**
* blocks for template inheritance * blocks for template inheritance
* *

View File

@@ -16,6 +16,38 @@
*/ */
abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
{ {
/**
* Global smarty instance
*
* @var Smarty
*/
public $smarty = null;
/**
* Set this if you want different sets of cache files for the same
* templates.
*
* @var string
*/
public $cache_id = null;
/**
* Set this if you want different sets of compiled files for the same
* templates.
*
* @var string
*/
public $compile_id = null;
/**
* caching enabled
*
* @var boolean
*/
public $caching = false;
/**
* cache lifetime in seconds
*
* @var integer
*/
public $cache_lifetime = 3600;
/** /**
* fetches a rendered Smarty template * fetches a rendered Smarty template
* *