1: | <?php
|
2: | |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | |
9: |
|
10: |
|
11: | |
12: | |
13: | |
14: | |
15: | |
16: |
|
17: | class Smarty_Internal_Compile_Shared_Inheritance extends Smarty_Internal_CompileBase
|
18: | {
|
19: | |
20: | |
21: | |
22: | |
23: | |
24: |
|
25: | public static function postCompile(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false)
|
26: | {
|
27: | $compiler->prefixCompiledCode .= "<?php \$_smarty_tpl->_loadInheritance();\n\$_smarty_tpl->inheritance->init(\$_smarty_tpl, " .
|
28: | var_export($initChildSequence, true) . ");\n?>\n";
|
29: | }
|
30: |
|
31: | |
32: | |
33: | |
34: | |
35: | |
36: |
|
37: | public function registerInit(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false)
|
38: | {
|
39: | if ($initChildSequence || !isset($compiler->_cache[ 'inheritanceInit' ])) {
|
40: | $compiler->registerPostCompileCallback(
|
41: | array('Smarty_Internal_Compile_Shared_Inheritance', 'postCompile'),
|
42: | array($initChildSequence),
|
43: | 'inheritanceInit',
|
44: | $initChildSequence
|
45: | );
|
46: | $compiler->_cache[ 'inheritanceInit' ] = true;
|
47: | }
|
48: | }
|
49: | }
|
50: | |