Today I dumped the contents of the template object.
I found that many variables are contained in the object multiple
times.
For example:
'templatename':
$tpl->templatename
$tpl->vars->templatename
$tpl->engine->config->outline_context->templatename
$tpl->engine->config->outline_context->vars->templatename
$tpl->config->outline_context->templatename
$tpl->config->outline_context->vars->templatename
'bracket_open':
$tpl->engine:protected->config->bracket_open
$tpl->engine:protected->config->outline_context->vars:protected-
>engine:protected->config->bracket_open
$tpl->engine:protected->config->outline_context->vars:protected-
>config:protected->bracket_open
$tpl->config:protected->bracket_open
and two more times!
Every variable that I assign to the template is contained three times
in the $tpl object!
Why are the variables saved separately for config, engine and at the
root level of the object?
Why carry around this excess overhead?