Location: PHPKode > scripts > SA PHP Framework > sa/doc/html/classSmarty__Compiler.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SA PHP Application Framework: Smarty_Compiler Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li id="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<h1>Smarty_Compiler Class Reference</h1><!-- doxytag: class="Smarty_Compiler" --><!-- doxytag: inherits="Smarty" -->Inherits <a class="el" href="classSmarty.html">Smarty</a>.
<p>
Inheritance diagram for Smarty_Compiler:<p><center><img src="classSmarty__Compiler__inherit__graph.png" border="0" usemap="#Smarty__Compiler__inherit__map" alt="Inheritance graph"></center>
<map name="Smarty__Compiler__inherit__map">
<area href="classSmarty.html" shape="rect" coords="36,7,100,31" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for Smarty_Compiler:<p><center><img src="classSmarty__Compiler__coll__graph.png" border="0" usemap="#Smarty__Compiler__coll__map" alt="Collaboration graph"></center>
<map name="Smarty__Compiler__coll__map">
<area href="classSmarty.html" shape="rect" coords="36,7,100,31" alt="">
</map>
<center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center><a href="classSmarty__Compiler-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7940bed7199f0d4c7c63d8a07a87bd8c"></a><!-- doxytag: member="Smarty_Compiler::Smarty_Compiler" ref="7940bed7199f0d4c7c63d8a07a87bd8c" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#7940bed7199f0d4c7c63d8a07a87bd8c">Smarty_Compiler</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The class constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#00459be8de7cd5876714023939411f10">_compile_file</a> ($resource_name, $source_content, &amp;$compiled_content)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile a resource  <a href="#00459be8de7cd5876714023939411f10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#2437ad0b38700c2b4b08573566c43c48">_compile_tag</a> ($template_tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile a template tag.  <a href="#2437ad0b38700c2b4b08573566c43c48"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#ad3738a1a92e9a579dd3ab14469386b9">_compile_compiler_tag</a> ($tag_command, $tag_args, &amp;$output)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile the custom compiler tag  <a href="#ad3738a1a92e9a579dd3ab14469386b9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#de3e40923ed1ea61b8578831c2767a76">_compile_block_tag</a> ($tag_command, $tag_args, $tag_modifier, &amp;$output)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile block function tag  <a href="#de3e40923ed1ea61b8578831c2767a76"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#4733e870ed01da5e62d52dde61cf2dec">_compile_custom_tag</a> ($tag_command, $tag_args, $tag_modifier, &amp;$output)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile custom function tag  <a href="#4733e870ed01da5e62d52dde61cf2dec"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#4768af997ac7a6ca06b6f426b9bd39cf">_compile_registered_object_tag</a> ($tag_command, $attrs, $tag_modifier)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile a registered object tag  <a href="#4768af997ac7a6ca06b6f426b9bd39cf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#4a9b22720c848862c5719a116246955d">_compile_insert_tag</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {insert .  <a href="#4a9b22720c848862c5719a116246955d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#78d8b41387b488cf352e4a638023e5ed">_compile_include_tag</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {include .  <a href="#78d8b41387b488cf352e4a638023e5ed"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#120c8620070c5417709f16896958c7bc">_compile_include_php_tag</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {include .  <a href="#120c8620070c5417709f16896958c7bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#d6c4e3a2309e3354a84fbf2992e78832">_compile_section_start</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {section .  <a href="#d6c4e3a2309e3354a84fbf2992e78832"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#f4169d507c719a53677048d51f61090d">_compile_foreach_start</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {foreach .  <a href="#f4169d507c719a53677048d51f61090d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#ce67ad4487e8492defe7d720712ddc01">_compile_capture_tag</a> ($start, $tag_args= '')</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {capture} .  <a href="#ce67ad4487e8492defe7d720712ddc01"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#58d511ec4be2cdd98a9cd9576816fa21">_compile_if_tag</a> ($tag_args, $elseif=false)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compile {if .  <a href="#58d511ec4be2cdd98a9cd9576816fa21"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb2bf6867e0434961e86130d8ee466e"></a><!-- doxytag: member="Smarty_Compiler::_compile_arg_list" ref="acb2bf6867e0434961e86130d8ee466e" args="($type, $name, $attrs, &amp;$cache_code)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#acb2bf6867e0434961e86130d8ee466e">_compile_arg_list</a> ($type, $name, $attrs, &amp;$cache_code)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#af4aec862e7a94d4217382dceae72b50">_parse_is_expr</a> ($is_arg, $tokens)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse is expression.  <a href="#af4aec862e7a94d4217382dceae72b50"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a> ($tag_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse attribute string.  <a href="#5706e11e1bec434a07ced48e1462507c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#0e01da79d898117be860ab893d15b477">_parse_vars_props</a> (&amp;$tokens)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile multiple variables and section properties tokens into PHP code  <a href="#0e01da79d898117be860ab893d15b477"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a> ($val)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compile single variable and section properties token into PHP code  <a href="#c289c6c7cacaab608f81e68976acca77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#ba11f398aa3e57fbf119bb1d718e854c">_expand_quoted_text</a> ($var_expr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">expand quoted text with embedded variables  <a href="#ba11f398aa3e57fbf119bb1d718e854c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#2dcafc2754e3bdbda348d4b728d16a0e">_parse_var</a> ($var_expr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">parse variable expression into PHP code  <a href="#2dcafc2754e3bdbda348d4b728d16a0e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#a33dedec468797a2311562fdd976c870">_parse_parenth_args</a> ($parenth_args)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">parse arguments in function call parenthesis  <a href="#a33dedec468797a2311562fdd976c870"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#5b6479977bec73b8ae0732c2b4f47d16">_parse_conf_var</a> ($conf_var_expr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">parse configuration variable expression into PHP code  <a href="#5b6479977bec73b8ae0732c2b4f47d16"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#f3c3473a68eab6b7d9a08f7dd2357469">_parse_section_prop</a> ($section_prop_expr)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">parse section property expression into PHP code  <a href="#f3c3473a68eab6b7d9a08f7dd2357469"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a> (&amp;$output, $modifier_string)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">parse modifier chain into PHP code  <a href="#5f39bfb73d59e9ec871c9c558c3c5d86"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#8dc53786beac8f4ca7c8d86cf1bbbd95">_add_plugin</a> ($type, $name, $delayed_loading=null)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add plugin  <a href="#8dc53786beac8f4ca7c8d86cf1bbbd95"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#dc652b9fb4277fd8d33d957608394751">_compile_smarty_ref</a> (&amp;$indexes)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compiles references of type $smarty.foo.  <a href="#dc652b9fb4277fd8d33d957608394751"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a> ($type, $name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">compiles call to plugin of type $type with name $name returns a string containing the function-name or method call without the paramter-list that would have follow to make the call valid php-syntax  <a href="#302b33495a918bef95258bfb0285a30c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c3298ba7a8acc1bafeaeae5428c3571e"></a><!-- doxytag: member="Smarty_Compiler::_load_filters" ref="c3298ba7a8acc1bafeaeae5428c3571e" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#c3298ba7a8acc1bafeaeae5428c3571e">_load_filters</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">load pre- and post-filters <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#bc08d6f05e29019bfff39a7e9d315feb">_quote_replace</a> ($string)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Quote subpattern references.  <a href="#bc08d6f05e29019bfff39a7e9d315feb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a> ($error_msg, $error_type=E_USER_ERROR, $file=null, $line=null)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">display <a class="el" href="classSmarty.html">Smarty</a> syntax error  <a href="#059eb89b6a2caca24b4dca502cb79ed9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#ecdd6b87ba3fdd6efb84b56c5e4dde17">_push_cacheable_state</a> ($type, $name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin.  <a href="#ecdd6b87ba3fdd6efb84b56c5e4dde17"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#93a26417dd094b744f7835099e24df0b">_pop_cacheable_state</a> ($type, $name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition.  <a href="#93a26417dd094b744f7835099e24df0b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a> ($open_tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">push opening tag-name, file-name and line-number on the tag-stack  <a href="#553d4bd92f21bc3714bf1cadeb61a9d7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a> ($close_tag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">pop closing tag-name raise an error if this stack-top doesn't match with the closing tag  <a href="#17a75d1aa9db594013757d6a829436a9"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e5cff1844f9c58d4e83ba2abc0dfa72"></a><!-- doxytag: member="Smarty_Compiler::$_folded_blocks" ref="1e5cff1844f9c58d4e83ba2abc0dfa72" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#1e5cff1844f9c58d4e83ba2abc0dfa72">$_folded_blocks</a> = array()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">#@+  private <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="04cecf3d9254b649ff8137d450e51134"></a><!-- doxytag: member="Smarty_Compiler::$_current_file" ref="04cecf3d9254b649ff8137d450e51134" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#04cecf3d9254b649ff8137d450e51134">$_current_file</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="60041715a86f820d7b8a755951730940"></a><!-- doxytag: member="Smarty_Compiler::$_current_line_no" ref="60041715a86f820d7b8a755951730940" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#60041715a86f820d7b8a755951730940">$_current_line_no</a> = 1</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4f48c151feff38d6e840a0c1d7a4ef8"></a><!-- doxytag: member="Smarty_Compiler::$_capture_stack" ref="d4f48c151feff38d6e840a0c1d7a4ef8" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#d4f48c151feff38d6e840a0c1d7a4ef8">$_capture_stack</a> = array()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bacc3e4d9217debfd6b03ba0e317f911"></a><!-- doxytag: member="Smarty_Compiler::$_plugin_info" ref="bacc3e4d9217debfd6b03ba0e317f911" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#bacc3e4d9217debfd6b03ba0e317f911">$_plugin_info</a> = array()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec4c0c589eadfe50758dbcfbdc3e2c5e"></a><!-- doxytag: member="Smarty_Compiler::$_init_smarty_vars" ref="ec4c0c589eadfe50758dbcfbdc3e2c5e" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#ec4c0c589eadfe50758dbcfbdc3e2c5e">$_init_smarty_vars</a> = false</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c8a47908cdccbc1ed8b923c8deb6bb9e"></a><!-- doxytag: member="Smarty_Compiler::$_permitted_tokens" ref="c8a47908cdccbc1ed8b923c8deb6bb9e" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#c8a47908cdccbc1ed8b923c8deb6bb9e">$_permitted_tokens</a> = array('true','false','yes','no','on','off','null')</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5604ede80d8e0887e377f1dfbc2c05d9"></a><!-- doxytag: member="Smarty_Compiler::$_db_qstr_regexp" ref="5604ede80d8e0887e377f1dfbc2c05d9" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#5604ede80d8e0887e377f1dfbc2c05d9">$_db_qstr_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fcbafe14268e79999c245c0181d84ee5"></a><!-- doxytag: member="Smarty_Compiler::$_si_qstr_regexp" ref="fcbafe14268e79999c245c0181d84ee5" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#fcbafe14268e79999c245c0181d84ee5">$_si_qstr_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45244ce9ca5b5b1b39540220c4404f6b"></a><!-- doxytag: member="Smarty_Compiler::$_qstr_regexp" ref="45244ce9ca5b5b1b39540220c4404f6b" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#45244ce9ca5b5b1b39540220c4404f6b">$_qstr_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd9bdad0027b9c2a5d7d92df3ffa456a"></a><!-- doxytag: member="Smarty_Compiler::$_func_regexp" ref="dd9bdad0027b9c2a5d7d92df3ffa456a" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#dd9bdad0027b9c2a5d7d92df3ffa456a">$_func_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9c6f66b6f575774d9124730791aad442"></a><!-- doxytag: member="Smarty_Compiler::$_reg_obj_regexp" ref="9c6f66b6f575774d9124730791aad442" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#9c6f66b6f575774d9124730791aad442">$_reg_obj_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e4916c43ccda33e9dd7a437aac488c0"></a><!-- doxytag: member="Smarty_Compiler::$_var_bracket_regexp" ref="2e4916c43ccda33e9dd7a437aac488c0" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#2e4916c43ccda33e9dd7a437aac488c0">$_var_bracket_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16ea6e0c1ac528d57cfc5593f4f63ab"></a><!-- doxytag: member="Smarty_Compiler::$_num_const_regexp" ref="a16ea6e0c1ac528d57cfc5593f4f63ab" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#a16ea6e0c1ac528d57cfc5593f4f63ab">$_num_const_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e232aa621d8b386dd3e89b13b8a7feca"></a><!-- doxytag: member="Smarty_Compiler::$_dvar_guts_regexp" ref="e232aa621d8b386dd3e89b13b8a7feca" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#e232aa621d8b386dd3e89b13b8a7feca">$_dvar_guts_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e42d6a86d159987a86ce6fea39d55061"></a><!-- doxytag: member="Smarty_Compiler::$_dvar_regexp" ref="e42d6a86d159987a86ce6fea39d55061" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#e42d6a86d159987a86ce6fea39d55061">$_dvar_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="152e511c25cf93e96d79d62ae0cf9868"></a><!-- doxytag: member="Smarty_Compiler::$_cvar_regexp" ref="152e511c25cf93e96d79d62ae0cf9868" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#152e511c25cf93e96d79d62ae0cf9868">$_cvar_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="574285b26bdaf51f3d5ee07a4237768c"></a><!-- doxytag: member="Smarty_Compiler::$_svar_regexp" ref="574285b26bdaf51f3d5ee07a4237768c" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#574285b26bdaf51f3d5ee07a4237768c">$_svar_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9963c1b3ed2db715f631e81a992815c0"></a><!-- doxytag: member="Smarty_Compiler::$_avar_regexp" ref="9963c1b3ed2db715f631e81a992815c0" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#9963c1b3ed2db715f631e81a992815c0">$_avar_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="595da4599e867fe7fdad66e912449694"></a><!-- doxytag: member="Smarty_Compiler::$_mod_regexp" ref="595da4599e867fe7fdad66e912449694" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#595da4599e867fe7fdad66e912449694">$_mod_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6f8002d23b7a70582c5fdb04bd19e6d"></a><!-- doxytag: member="Smarty_Compiler::$_var_regexp" ref="c6f8002d23b7a70582c5fdb04bd19e6d" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#c6f8002d23b7a70582c5fdb04bd19e6d">$_var_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1faad41714ea0045bfe6110ca1e2b5c3"></a><!-- doxytag: member="Smarty_Compiler::$_parenth_param_regexp" ref="1faad41714ea0045bfe6110ca1e2b5c3" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#1faad41714ea0045bfe6110ca1e2b5c3">$_parenth_param_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faee7faec05911eea2c9ff33b5ecb541"></a><!-- doxytag: member="Smarty_Compiler::$_func_call_regexp" ref="faee7faec05911eea2c9ff33b5ecb541" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#faee7faec05911eea2c9ff33b5ecb541">$_func_call_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b4dd482df3671bfa4fec0f68e4a0758"></a><!-- doxytag: member="Smarty_Compiler::$_obj_ext_regexp" ref="7b4dd482df3671bfa4fec0f68e4a0758" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#7b4dd482df3671bfa4fec0f68e4a0758">$_obj_ext_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="244894792ee8ae726dffcfcab4b5e32d"></a><!-- doxytag: member="Smarty_Compiler::$_obj_start_regexp" ref="244894792ee8ae726dffcfcab4b5e32d" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#244894792ee8ae726dffcfcab4b5e32d">$_obj_start_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c71ef99a1dd18d997ca135223054da8d"></a><!-- doxytag: member="Smarty_Compiler::$_obj_params_regexp" ref="c71ef99a1dd18d997ca135223054da8d" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#c71ef99a1dd18d997ca135223054da8d">$_obj_params_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="be7bae0befebfdcc2f1643ac470f450a"></a><!-- doxytag: member="Smarty_Compiler::$_obj_call_regexp" ref="be7bae0befebfdcc2f1643ac470f450a" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#be7bae0befebfdcc2f1643ac470f450a">$_obj_call_regexp</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1f04c5f10b176a4c7e17724e9c407197"></a><!-- doxytag: member="Smarty_Compiler::$_cacheable_state" ref="1f04c5f10b176a4c7e17724e9c407197" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#1f04c5f10b176a4c7e17724e9c407197">$_cacheable_state</a> = 0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="31147de1885c80f942ba8ea9d7c60b69"></a><!-- doxytag: member="Smarty_Compiler::$_cache_attrs_count" ref="31147de1885c80f942ba8ea9d7c60b69" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#31147de1885c80f942ba8ea9d7c60b69">$_cache_attrs_count</a> = 0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a86982bd4b9abf8c1c667f3940751e63"></a><!-- doxytag: member="Smarty_Compiler::$_nocache_count" ref="a86982bd4b9abf8c1c667f3940751e63" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#a86982bd4b9abf8c1c667f3940751e63">$_nocache_count</a> = 0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6efcf1cc6d2d059c51a13824b6cf2d4c"></a><!-- doxytag: member="Smarty_Compiler::$_cache_serial" ref="6efcf1cc6d2d059c51a13824b6cf2d4c" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#6efcf1cc6d2d059c51a13824b6cf2d4c">$_cache_serial</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1c8cb893383a80e1b5719fb76ff248d"></a><!-- doxytag: member="Smarty_Compiler::$_cache_include" ref="e1c8cb893383a80e1b5719fb76ff248d" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#e1c8cb893383a80e1b5719fb76ff248d">$_cache_include</a> = null</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="75fe029f8dee8969bffadf09a61de3a0"></a><!-- doxytag: member="Smarty_Compiler::$_strip_depth" ref="75fe029f8dee8969bffadf09a61de3a0" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#75fe029f8dee8969bffadf09a61de3a0">$_strip_depth</a> = 0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="de17925578b2ff11f56ae51446c82df8"></a><!-- doxytag: member="Smarty_Compiler::$_additional_newline" ref="de17925578b2ff11f56ae51446c82df8" args="" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSmarty__Compiler.html#de17925578b2ff11f56ae51446c82df8">$_additional_newline</a> = &quot;\n&quot;</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>

<p>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00035">35</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8dc53786beac8f4ca7c8d86cf1bbbd95"></a><!-- doxytag: member="Smarty_Compiler::_add_plugin" ref="8dc53786beac8f4ca7c8d86cf1bbbd95" args="($type, $name, $delayed_loading=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_add_plugin           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>delayed_loading</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
add plugin 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>boolean?</em>&nbsp;</td><td>$delayed_loading </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01962">1962</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01963"></a>01963     {
<a name="l01964"></a>01964         <span class="keywordflow">if</span> (!isset($this-&gt;_plugin_info[$type])) {
<a name="l01965"></a>01965             $this-&gt;_plugin_info[$type] = array();
<a name="l01966"></a>01966         }
<a name="l01967"></a>01967         <span class="keywordflow">if</span> (!isset($this-&gt;_plugin_info[$type][$name])) {
<a name="l01968"></a>01968             $this-&gt;_plugin_info[$type][$name] = array($this-&gt;_current_file,
<a name="l01969"></a>01969                                                       $this-&gt;_current_line_no,
<a name="l01970"></a>01970                                                       $delayed_loading);
<a name="l01971"></a>01971         }
<a name="l01972"></a>01972     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="de3e40923ed1ea61b8578831c2767a76"></a><!-- doxytag: member="Smarty_Compiler::_compile_block_tag" ref="de3e40923ed1ea61b8578831c2767a76" args="($tag_command, $tag_args, $tag_modifier, &amp;$output)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_block_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_command</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_args</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_modifier</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>&amp;$&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile block function tag 
<p>
sets $output to compiled block function tag <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_command </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_modifier </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$output </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>boolean </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00668">668</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00669"></a>00669     {
<a name="l00670"></a>00670         <span class="keywordflow">if</span> (substr($tag_command, 0, 1) == <span class="charliteral">'/'</span>) {
<a name="l00671"></a>00671             $start_tag = <span class="keyword">false</span>;
<a name="l00672"></a>00672             $tag_command = substr($tag_command, 1);
<a name="l00673"></a>00673         } <span class="keywordflow">else</span>
<a name="l00674"></a>00674             $start_tag = <span class="keyword">true</span>;
<a name="l00675"></a>00675 
<a name="l00676"></a>00676         $found = <span class="keyword">false</span>;
<a name="l00677"></a>00677         $have_function = <span class="keyword">true</span>;
<a name="l00678"></a>00678 
<a name="l00679"></a>00679         <span class="comment">/*</span>
<a name="l00680"></a>00680 <span class="comment">         * First we check if the block function has already been registered</span>
<a name="l00681"></a>00681 <span class="comment">         * or loaded from a plugin file.</span>
<a name="l00682"></a>00682 <span class="comment">         */</span>
<a name="l00683"></a>00683         <span class="keywordflow">if</span> (isset($this-&gt;_plugins['block'][$tag_command])) {
<a name="l00684"></a>00684             $found = <span class="keyword">true</span>;
<a name="l00685"></a>00685             $plugin_func = $this-&gt;_plugins['block'][$tag_command][0];
<a name="l00686"></a>00686             <span class="keywordflow">if</span> (!is_callable($plugin_func)) {
<a name="l00687"></a>00687                 $message = <span class="stringliteral">"block function '$tag_command' is not implemented"</span>;
<a name="l00688"></a>00688                 $have_function = <span class="keyword">false</span>;
<a name="l00689"></a>00689             }
<a name="l00690"></a>00690         }
<a name="l00691"></a>00691         <span class="comment">/*</span>
<a name="l00692"></a>00692 <span class="comment">         * Otherwise we need to load plugin file and look for the function</span>
<a name="l00693"></a>00693 <span class="comment">         * inside it.</span>
<a name="l00694"></a>00694 <span class="comment">         */</span>
<a name="l00695"></a>00695         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($plugin_file = $this-&gt;<a class="code" href="classSmarty.html#5e3e1de75662305f3e2b08f536ed1918">_get_plugin_filepath</a>('block', $tag_command)) {
<a name="l00696"></a>00696             $found = <span class="keyword">true</span>;
<a name="l00697"></a>00697 
<a name="l00698"></a>00698             include_once $plugin_file;
<a name="l00699"></a>00699 
<a name="l00700"></a>00700             $plugin_func = 'smarty_block_' . $tag_command;
<a name="l00701"></a>00701             <span class="keywordflow">if</span> (!function_exists($plugin_func)) {
<a name="l00702"></a>00702                 $message = <span class="stringliteral">"plugin function $plugin_func() not found in $plugin_file\n"</span>;
<a name="l00703"></a>00703                 $have_function = <span class="keyword">false</span>;
<a name="l00704"></a>00704             } <span class="keywordflow">else</span> {
<a name="l00705"></a>00705                 $this-&gt;_plugins['block'][$tag_command] = array($plugin_func, null, null, null, <span class="keyword">true</span>);
<a name="l00706"></a>00706 
<a name="l00707"></a>00707             }
<a name="l00708"></a>00708         }
<a name="l00709"></a>00709 
<a name="l00710"></a>00710         <span class="keywordflow">if</span> (!$found) {
<a name="l00711"></a>00711             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00712"></a>00712         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!$have_function) {
<a name="l00713"></a>00713             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>($message, E_USER_WARNING, __FILE__, __LINE__);
<a name="l00714"></a>00714             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00715"></a>00715         }
<a name="l00716"></a>00716 
<a name="l00717"></a>00717         <span class="comment">/*</span>
<a name="l00718"></a>00718 <span class="comment">         * Even though we've located the plugin function, compilation</span>
<a name="l00719"></a>00719 <span class="comment">         * happens only once, so the plugin will still need to be loaded</span>
<a name="l00720"></a>00720 <span class="comment">         * at runtime for future requests.</span>
<a name="l00721"></a>00721 <span class="comment">         */</span>
<a name="l00722"></a>00722         $this-&gt;<a class="code" href="classSmarty__Compiler.html#8dc53786beac8f4ca7c8d86cf1bbbd95">_add_plugin</a>('block', $tag_command);
<a name="l00723"></a>00723 
<a name="l00724"></a>00724         <span class="keywordflow">if</span> ($start_tag)
<a name="l00725"></a>00725             $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>($tag_command);
<a name="l00726"></a>00726         <span class="keywordflow">else</span>
<a name="l00727"></a>00727             $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>($tag_command);
<a name="l00728"></a>00728 
<a name="l00729"></a>00729         <span class="keywordflow">if</span> ($start_tag) {
<a name="l00730"></a>00730             $output = '&lt;?php ' . $this-&gt;<a class="code" href="classSmarty__Compiler.html#ecdd6b87ba3fdd6efb84b56c5e4dde17">_push_cacheable_state</a>('block', $tag_command);
<a name="l00731"></a>00731             $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l00732"></a>00732             $_cache_attrs='';
<a name="l00733"></a>00733             $arg_list = $this-&gt;<a class="code" href="classSmarty__Compiler.html#acb2bf6867e0434961e86130d8ee466e">_compile_arg_list</a>('block', $tag_command, $attrs, $_cache_attrs);
<a name="l00734"></a>00734             $output .= <span class="stringliteral">"$_cache_attrs\$this-&gt;_tag_stack[] = array('$tag_command', array("</span>.implode(<span class="charliteral">','</span>, $arg_list).')); ';
<a name="l00735"></a>00735             $output .= '$_block_repeat=<span class="keyword">true</span>;' . $this-&gt;<a class="code" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a>('block', $tag_command).'($this-&gt;_tag_stack[count($this-&gt;_tag_stack)-1][1], null, $this, $_block_repeat);';
<a name="l00736"></a>00736             $output .= '<span class="keywordflow">while</span> ($_block_repeat) { ob_start(); ?&gt;';
<a name="l00737"></a>00737         } <span class="keywordflow">else</span> {
<a name="l00738"></a>00738             $output = '&lt;?php $_block_content = ob_get_contents(); ob_end_clean(); ';
<a name="l00739"></a>00739             $_out_tag_text = $this-&gt;<a class="code" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a>('block', $tag_command).'($this-&gt;_tag_stack[count($this-&gt;_tag_stack)-1][1], $_block_content, $this, $_block_repeat)';
<a name="l00740"></a>00740             <span class="keywordflow">if</span> ($tag_modifier != '') {
<a name="l00741"></a>00741                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($_out_tag_text, $tag_modifier);
<a name="l00742"></a>00742             }
<a name="l00743"></a>00743             $output .= '$_block_repeat=<span class="keyword">false</span>;echo ' . $_out_tag_text . '; } ';
<a name="l00744"></a>00744             $output .= <span class="stringliteral">" array_pop(\$this-&gt;_tag_stack); "</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#93a26417dd094b744f7835099e24df0b">_pop_cacheable_state</a>('block', $tag_command) . '?&gt;';
<a name="l00745"></a>00745         }
<a name="l00746"></a>00746 
<a name="l00747"></a>00747         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00748"></a>00748     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ce67ad4487e8492defe7d720712ddc01"></a><!-- doxytag: member="Smarty_Compiler::_compile_capture_tag" ref="ce67ad4487e8492defe7d720712ddc01" args="($start, $tag_args= '')" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_capture_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_args</em> = <code>''</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {capture} . 
<p>
. {/capture} tags<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>boolean</em>&nbsp;</td><td>$start true if this is the {capture} tag </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01209">1209</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01210"></a>01210     {
<a name="l01211"></a>01211         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l01212"></a>01212 
<a name="l01213"></a>01213         <span class="keywordflow">if</span> ($start) {
<a name="l01214"></a>01214             <span class="keywordflow">if</span> (isset($attrs['name']))
<a name="l01215"></a>01215                 $buffer = $attrs['name'];
<a name="l01216"></a>01216             <span class="keywordflow">else</span>
<a name="l01217"></a>01217                 $buffer = <span class="stringliteral">"'default'"</span>;
<a name="l01218"></a>01218 
<a name="l01219"></a>01219             <span class="keywordflow">if</span> (isset($attrs['<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>']))
<a name="l01220"></a>01220                 $assign = $attrs['assign'];
<a name="l01221"></a>01221             <span class="keywordflow">else</span>
<a name="l01222"></a>01222                 $assign = null;
<a name="l01223"></a>01223             $output = <span class="stringliteral">"&lt;?php ob_start(); ?&gt;"</span>;
<a name="l01224"></a>01224             $this-&gt;_capture_stack[] = array($buffer, $assign);
<a name="l01225"></a>01225         } <span class="keywordflow">else</span> {
<a name="l01226"></a>01226             list($buffer, $assign) = array_pop($this-&gt;_capture_stack);
<a name="l01227"></a>01227             $output = <span class="stringliteral">"&lt;?php \$this-&gt;_smarty_vars['capture'][$buffer] = ob_get_contents(); "</span>;
<a name="l01228"></a>01228             <span class="keywordflow">if</span> (isset($assign)) {
<a name="l01229"></a>01229                 $output .= <span class="stringliteral">" \$this-&gt;assign($assign, ob_get_contents());"</span>;
<a name="l01230"></a>01230             }
<a name="l01231"></a>01231             $output .= <span class="stringliteral">"ob_end_clean(); ?&gt;"</span>;
<a name="l01232"></a>01232         }
<a name="l01233"></a>01233 
<a name="l01234"></a>01234         <span class="keywordflow">return</span> $output;
<a name="l01235"></a>01235     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ad3738a1a92e9a579dd3ab14469386b9"></a><!-- doxytag: member="Smarty_Compiler::_compile_compiler_tag" ref="ad3738a1a92e9a579dd3ab14469386b9" args="($tag_command, $tag_args, &amp;$output)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_compiler_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_command</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_args</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>&amp;$&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile the custom compiler tag 
<p>
sets $output to the compiled custom compiler tag <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_command </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$output </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>boolean </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00599">599</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00600"></a>00600     {
<a name="l00601"></a>00601         $found = <span class="keyword">false</span>;
<a name="l00602"></a>00602         $have_function = <span class="keyword">true</span>;
<a name="l00603"></a>00603 
<a name="l00604"></a>00604         <span class="comment">/*</span>
<a name="l00605"></a>00605 <span class="comment">         * First we check if the compiler function has already been registered</span>
<a name="l00606"></a>00606 <span class="comment">         * or loaded from a plugin file.</span>
<a name="l00607"></a>00607 <span class="comment">         */</span>
<a name="l00608"></a>00608         <span class="keywordflow">if</span> (isset($this-&gt;_plugins['compiler'][$tag_command])) {
<a name="l00609"></a>00609             $found = <span class="keyword">true</span>;
<a name="l00610"></a>00610             $plugin_func = $this-&gt;_plugins['compiler'][$tag_command][0];
<a name="l00611"></a>00611             <span class="keywordflow">if</span> (!is_callable($plugin_func)) {
<a name="l00612"></a>00612                 $message = <span class="stringliteral">"compiler function '$tag_command' is not implemented"</span>;
<a name="l00613"></a>00613                 $have_function = <span class="keyword">false</span>;
<a name="l00614"></a>00614             }
<a name="l00615"></a>00615         }
<a name="l00616"></a>00616         <span class="comment">/*</span>
<a name="l00617"></a>00617 <span class="comment">         * Otherwise we need to load plugin file and look for the function</span>
<a name="l00618"></a>00618 <span class="comment">         * inside it.</span>
<a name="l00619"></a>00619 <span class="comment">         */</span>
<a name="l00620"></a>00620         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($plugin_file = $this-&gt;<a class="code" href="classSmarty.html#5e3e1de75662305f3e2b08f536ed1918">_get_plugin_filepath</a>('compiler', $tag_command)) {
<a name="l00621"></a>00621             $found = <span class="keyword">true</span>;
<a name="l00622"></a>00622 
<a name="l00623"></a>00623             include_once $plugin_file;
<a name="l00624"></a>00624 
<a name="l00625"></a>00625             $plugin_func = 'smarty_compiler_' . $tag_command;
<a name="l00626"></a>00626             <span class="keywordflow">if</span> (!is_callable($plugin_func)) {
<a name="l00627"></a>00627                 $message = <span class="stringliteral">"plugin function $plugin_func() not found in $plugin_file\n"</span>;
<a name="l00628"></a>00628                 $have_function = <span class="keyword">false</span>;
<a name="l00629"></a>00629             } <span class="keywordflow">else</span> {
<a name="l00630"></a>00630                 $this-&gt;_plugins['compiler'][$tag_command] = array($plugin_func, null, null, null, <span class="keyword">true</span>);
<a name="l00631"></a>00631             }
<a name="l00632"></a>00632         }
<a name="l00633"></a>00633 
<a name="l00634"></a>00634         <span class="comment">/*</span>
<a name="l00635"></a>00635 <span class="comment">         * True return value means that we either found a plugin or a</span>
<a name="l00636"></a>00636 <span class="comment">         * dynamically registered function. False means that we didn't and the</span>
<a name="l00637"></a>00637 <span class="comment">         * compiler should now emit code to load custom function plugin for this</span>
<a name="l00638"></a>00638 <span class="comment">         * tag.</span>
<a name="l00639"></a>00639 <span class="comment">         */</span>
<a name="l00640"></a>00640         <span class="keywordflow">if</span> ($found) {
<a name="l00641"></a>00641             <span class="keywordflow">if</span> ($have_function) {
<a name="l00642"></a>00642                 $output = call_user_func_array($plugin_func, array($tag_args, &amp;$this));
<a name="l00643"></a>00643                 <span class="keywordflow">if</span>($output != '') {
<a name="l00644"></a>00644                 $output = '&lt;?php ' . $this-&gt;<a class="code" href="classSmarty__Compiler.html#ecdd6b87ba3fdd6efb84b56c5e4dde17">_push_cacheable_state</a>('compiler', $tag_command)
<a name="l00645"></a>00645                                    . $output
<a name="l00646"></a>00646                                    . $this-&gt;<a class="code" href="classSmarty__Compiler.html#93a26417dd094b744f7835099e24df0b">_pop_cacheable_state</a>('compiler', $tag_command) . ' ?&gt;';
<a name="l00647"></a>00647                 }
<a name="l00648"></a>00648             } <span class="keywordflow">else</span> {
<a name="l00649"></a>00649                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>($message, E_USER_WARNING, __FILE__, __LINE__);
<a name="l00650"></a>00650             }
<a name="l00651"></a>00651             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00652"></a>00652         } <span class="keywordflow">else</span> {
<a name="l00653"></a>00653             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00654"></a>00654         }
<a name="l00655"></a>00655     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="4733e870ed01da5e62d52dde61cf2dec"></a><!-- doxytag: member="Smarty_Compiler::_compile_custom_tag" ref="4733e870ed01da5e62d52dde61cf2dec" args="($tag_command, $tag_args, $tag_modifier, &amp;$output)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_custom_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_command</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_args</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_modifier</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>&amp;$&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile custom function tag 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_command </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_modifier </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00759">759</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00760"></a>00760     {
<a name="l00761"></a>00761         $found = <span class="keyword">false</span>;
<a name="l00762"></a>00762         $have_function = <span class="keyword">true</span>;
<a name="l00763"></a>00763 
<a name="l00764"></a>00764         <span class="comment">/*</span>
<a name="l00765"></a>00765 <span class="comment">         * First we check if the custom function has already been registered</span>
<a name="l00766"></a>00766 <span class="comment">         * or loaded from a plugin file.</span>
<a name="l00767"></a>00767 <span class="comment">         */</span>
<a name="l00768"></a>00768         <span class="keywordflow">if</span> (isset($this-&gt;_plugins['function'][$tag_command])) {
<a name="l00769"></a>00769             $found = <span class="keyword">true</span>;
<a name="l00770"></a>00770             $plugin_func = $this-&gt;_plugins['function'][$tag_command][0];
<a name="l00771"></a>00771             <span class="keywordflow">if</span> (!is_callable($plugin_func)) {
<a name="l00772"></a>00772                 $message = <span class="stringliteral">"custom function '$tag_command' is not implemented"</span>;
<a name="l00773"></a>00773                 $have_function = <span class="keyword">false</span>;
<a name="l00774"></a>00774             }
<a name="l00775"></a>00775         }
<a name="l00776"></a>00776         <span class="comment">/*</span>
<a name="l00777"></a>00777 <span class="comment">         * Otherwise we need to load plugin file and look for the function</span>
<a name="l00778"></a>00778 <span class="comment">         * inside it.</span>
<a name="l00779"></a>00779 <span class="comment">         */</span>
<a name="l00780"></a>00780         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($plugin_file = $this-&gt;<a class="code" href="classSmarty.html#5e3e1de75662305f3e2b08f536ed1918">_get_plugin_filepath</a>('function', $tag_command)) {
<a name="l00781"></a>00781             $found = <span class="keyword">true</span>;
<a name="l00782"></a>00782 
<a name="l00783"></a>00783             include_once $plugin_file;
<a name="l00784"></a>00784 
<a name="l00785"></a>00785             $plugin_func = 'smarty_function_' . $tag_command;
<a name="l00786"></a>00786             <span class="keywordflow">if</span> (!function_exists($plugin_func)) {
<a name="l00787"></a>00787                 $message = <span class="stringliteral">"plugin function $plugin_func() not found in $plugin_file\n"</span>;
<a name="l00788"></a>00788                 $have_function = <span class="keyword">false</span>;
<a name="l00789"></a>00789             } <span class="keywordflow">else</span> {
<a name="l00790"></a>00790                 $this-&gt;_plugins['function'][$tag_command] = array($plugin_func, null, null, null, <span class="keyword">true</span>);
<a name="l00791"></a>00791 
<a name="l00792"></a>00792             }
<a name="l00793"></a>00793         }
<a name="l00794"></a>00794 
<a name="l00795"></a>00795         <span class="keywordflow">if</span> (!$found) {
<a name="l00796"></a>00796             <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00797"></a>00797         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!$have_function) {
<a name="l00798"></a>00798             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>($message, E_USER_WARNING, __FILE__, __LINE__);
<a name="l00799"></a>00799             <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00800"></a>00800         }
<a name="l00801"></a>00801 
<a name="l00802"></a>00802         <span class="comment">/* declare plugin to be loaded on display of the template that</span>
<a name="l00803"></a>00803 <span class="comment">           we compile right now */</span>
<a name="l00804"></a>00804         $this-&gt;<a class="code" href="classSmarty__Compiler.html#8dc53786beac8f4ca7c8d86cf1bbbd95">_add_plugin</a>('function', $tag_command);
<a name="l00805"></a>00805 
<a name="l00806"></a>00806         <a class="code" href="classSmarty__Compiler.html#1f04c5f10b176a4c7e17724e9c407197">$_cacheable_state</a> = $this-&gt;<a class="code" href="classSmarty__Compiler.html#ecdd6b87ba3fdd6efb84b56c5e4dde17">_push_cacheable_state</a>('function', $tag_command);
<a name="l00807"></a>00807         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l00808"></a>00808         $_cache_attrs = '';
<a name="l00809"></a>00809         $arg_list = $this-&gt;<a class="code" href="classSmarty__Compiler.html#acb2bf6867e0434961e86130d8ee466e">_compile_arg_list</a>('function', $tag_command, $attrs, $_cache_attrs);
<a name="l00810"></a>00810 
<a name="l00811"></a>00811         $output = $this-&gt;<a class="code" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a>('function', $tag_command).'(array('.implode(<span class="charliteral">','</span>, $arg_list).<span class="stringliteral">"), \$this)"</span>;
<a name="l00812"></a>00812         <span class="keywordflow">if</span>($tag_modifier != '') {
<a name="l00813"></a>00813             $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($output, $tag_modifier);
<a name="l00814"></a>00814         }
<a name="l00815"></a>00815 
<a name="l00816"></a>00816         <span class="keywordflow">if</span>($output != '') {
<a name="l00817"></a>00817             $output =  '&lt;?php ' . <a class="code" href="classSmarty__Compiler.html#1f04c5f10b176a4c7e17724e9c407197">$_cacheable_state</a> . $_cache_attrs . 'echo ' . $output . <span class="charliteral">';'</span>
<a name="l00818"></a>00818                 . $this-&gt;<a class="code" href="classSmarty__Compiler.html#93a26417dd094b744f7835099e24df0b">_pop_cacheable_state</a>('function', $tag_command) . <span class="stringliteral">"?&gt;"</span> . $this-&gt;_additional_newline;
<a name="l00819"></a>00819         }
<a name="l00820"></a>00820 
<a name="l00821"></a>00821         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00822"></a>00822     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="00459be8de7cd5876714023939411f10"></a><!-- doxytag: member="Smarty_Compiler::_compile_file" ref="00459be8de7cd5876714023939411f10" args="($resource_name, $source_content, &amp;$compiled_content)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_file           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>resource_name</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>source_content</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>&amp;$&nbsp;</td>
          <td class="mdname" nowrap> <em>compiled_content</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile a resource 
<p>
sets $compiled_content to the compiled source <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$resource_name </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$source_content </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$compiled_content </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00225">225</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.
<p>
References <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02161">_load_filters()</a>, <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02192">_quote_replace()</a>, and <a class="el" href="Smarty_8class_8php-source.html#l01808">Smarty::_trigger_fatal_error()</a>.<div class="fragment"><pre class="fragment"><a name="l00226"></a>00226     {
<a name="l00227"></a>00227 
<a name="l00228"></a>00228         <span class="keywordflow">if</span> ($this-&gt;security) {
<a name="l00229"></a>00229             <span class="comment">// do not allow php syntax to be executed unless specified</span>
<a name="l00230"></a>00230             <span class="keywordflow">if</span> ($this-&gt;php_handling == SMARTY_PHP_ALLOW &amp;&amp;
<a name="l00231"></a>00231                 !$this-&gt;security_settings['PHP_HANDLING']) {
<a name="l00232"></a>00232                 $this-&gt;php_handling = SMARTY_PHP_PASSTHRU;
<a name="l00233"></a>00233             }
<a name="l00234"></a>00234         }
<a name="l00235"></a>00235 
<a name="l00236"></a>00236         $this-&gt;<a class="code" href="classSmarty__Compiler.html#c3298ba7a8acc1bafeaeae5428c3571e">_load_filters</a>();
<a name="l00237"></a>00237 
<a name="l00238"></a>00238         $this-&gt;_current_file = $resource_name;
<a name="l00239"></a>00239         $this-&gt;_current_line_no = 1;
<a name="l00240"></a>00240         $ldq = preg_quote($this-&gt;left_delimiter, <span class="charliteral">'~'</span>);
<a name="l00241"></a>00241         $rdq = preg_quote($this-&gt;right_delimiter, <span class="charliteral">'~'</span>);
<a name="l00242"></a>00242 
<a name="l00243"></a>00243         <span class="comment">/* un-hide hidden xml open tags  */</span>
<a name="l00244"></a>00244         $source_content = preg_replace(<span class="stringliteral">"~&lt;({$ldq}(.*?){$rdq})[?]~s"</span>, '&lt; \\1', $source_content);
<a name="l00245"></a>00245 
<a name="l00246"></a>00246         <span class="comment">// run template source through prefilter functions</span>
<a name="l00247"></a>00247         <span class="keywordflow">if</span> (count($this-&gt;_plugins['prefilter']) &gt; 0) {
<a name="l00248"></a>00248             foreach ($this-&gt;_plugins['prefilter'] as $filter_name =&gt; $prefilter) {
<a name="l00249"></a>00249                 <span class="keywordflow">if</span> ($prefilter === <span class="keyword">false</span>) <span class="keywordflow">continue</span>;
<a name="l00250"></a>00250                 <span class="keywordflow">if</span> ($prefilter[3] || is_callable($prefilter[0])) {
<a name="l00251"></a>00251                     $source_content = call_user_func_array($prefilter[0],
<a name="l00252"></a>00252                                                             array($source_content, &amp;$this));
<a name="l00253"></a>00253                     $this-&gt;_plugins['prefilter'][$filter_name][3] = <span class="keyword">true</span>;
<a name="l00254"></a>00254                 } <span class="keywordflow">else</span> {
<a name="l00255"></a>00255                     $this-&gt;<a class="code" href="classSmarty.html#2af2bdd132f9c210183775c0bf1c22d9">_trigger_fatal_error</a>(<span class="stringliteral">"[plugin] prefilter '$filter_name' is not implemented"</span>);
<a name="l00256"></a>00256                 }
<a name="l00257"></a>00257             }
<a name="l00258"></a>00258         }
<a name="l00259"></a>00259 
<a name="l00260"></a>00260         <span class="comment">/* fetch all special blocks */</span>
<a name="l00261"></a>00261         $search = <span class="stringliteral">"~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s"</span>;
<a name="l00262"></a>00262 
<a name="l00263"></a>00263         preg_match_all($search, $source_content, $match,  PREG_SET_ORDER);
<a name="l00264"></a>00264         $this-&gt;_folded_blocks = $match;
<a name="l00265"></a>00265         reset($this-&gt;_folded_blocks);
<a name="l00266"></a>00266 
<a name="l00267"></a>00267         <span class="comment">/* replace special blocks by "{php}" */</span>
<a name="l00268"></a>00268         $source_content = preg_replace($search.<span class="charliteral">'e'</span>, <span class="stringliteral">"'"</span>
<a name="l00269"></a>00269                                        . $this-&gt;<a class="code" href="classSmarty__Compiler.html#bc08d6f05e29019bfff39a7e9d315feb">_quote_replace</a>($this-&gt;left_delimiter) . 'php'
<a name="l00270"></a>00270                                        . <span class="stringliteral">"' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"</span>
<a name="l00271"></a>00271                                        . $this-&gt;<a class="code" href="classSmarty__Compiler.html#bc08d6f05e29019bfff39a7e9d315feb">_quote_replace</a>($this-&gt;right_delimiter)
<a name="l00272"></a>00272                                        . <span class="stringliteral">"'"</span>
<a name="l00273"></a>00273                                        , $source_content);
<a name="l00274"></a>00274 
<a name="l00275"></a>00275         <span class="comment">/* Gather all template tags. */</span>
<a name="l00276"></a>00276         preg_match_all(<span class="stringliteral">"~{$ldq}\s*(.*?)\s*{$rdq}~s"</span>, $source_content, $_match);
<a name="l00277"></a>00277         $template_tags = $_match[1];
<a name="l00278"></a>00278         <span class="comment">/* Split content by template tags to obtain non-template content. */</span>
<a name="l00279"></a>00279         $text_blocks = preg_split(<span class="stringliteral">"~{$ldq}.*?{$rdq}~s"</span>, $source_content);
<a name="l00280"></a>00280 
<a name="l00281"></a>00281         <span class="comment">/* loop through text blocks */</span>
<a name="l00282"></a>00282         <span class="keywordflow">for</span> ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb &lt; $for_max; $curr_tb++) {
<a name="l00283"></a>00283             <span class="comment">/* match anything resembling php tags */</span>
<a name="l00284"></a>00284             <span class="keywordflow">if</span> (preg_match_all('~(&lt;\?(?:\w+|=)?|\?&gt;|language\s*=\s*[\<span class="stringliteral">"\']?php[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {</span>
<a name="l00285"></a>00285 <span class="stringliteral">                /* replace tags with placeholders to prevent recursive replacements */</span>
<a name="l00286"></a>00286 <span class="stringliteral">                $sp_match[1] = array_unique($sp_match[1]);</span>
<a name="l00287"></a>00287 <span class="stringliteral">                usort($sp_match[1], '_smarty_sort_length');</span>
<a name="l00288"></a>00288 <span class="stringliteral">                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp &lt; $for_max2; $curr_sp++) {</span>
<a name="l00289"></a>00289 <span class="stringliteral">                    $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);</span>
<a name="l00290"></a>00290 <span class="stringliteral">                }</span>
<a name="l00291"></a>00291 <span class="stringliteral">                /* process each one */</span>
<a name="l00292"></a>00292 <span class="stringliteral">                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp &lt; $for_max2; $curr_sp++) {</span>
<a name="l00293"></a>00293 <span class="stringliteral">                    if ($this-&gt;php_handling == SMARTY_PHP_PASSTHRU) {</span>
<a name="l00294"></a>00294 <span class="stringliteral">                        /* echo php contents */</span>
<a name="l00295"></a>00295 <span class="stringliteral">                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '&lt;?php echo \''.str_replace("</span>'<span class="stringliteral">", "</span>\'<span class="stringliteral">", $sp_match[1][$curr_sp]).'\'; ?&gt;'."</span>\n<span class="stringliteral">", $text_blocks[$curr_tb]);</span>
<a name="l00296"></a>00296 <span class="stringliteral">                    } else if ($this-&gt;php_handling == SMARTY_PHP_QUOTE) {</span>
<a name="l00297"></a>00297 <span class="stringliteral">                        /* quote php tags */</span>
<a name="l00298"></a>00298 <span class="stringliteral">                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);</span>
<a name="l00299"></a>00299 <span class="stringliteral">                    } else if ($this-&gt;php_handling == SMARTY_PHP_REMOVE) {</span>
<a name="l00300"></a>00300 <span class="stringliteral">                        /* remove php tags */</span>
<a name="l00301"></a>00301 <span class="stringliteral">                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);</span>
<a name="l00302"></a>00302 <span class="stringliteral">                    } else {</span>
<a name="l00303"></a>00303 <span class="stringliteral">                        /* SMARTY_PHP_ALLOW, but echo non php starting tags */</span>
<a name="l00304"></a>00304 <span class="stringliteral">                        $sp_match[1][$curr_sp] = preg_replace('~(&lt;\?(?!php|=|$))~i', '&lt;?php echo \'\\1\'?&gt;'."</span>\n<span class="stringliteral">", $sp_match[1][$curr_sp]);</span>
<a name="l00305"></a>00305 <span class="stringliteral">                        $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', $sp_match[1][$curr_sp], $text_blocks[$curr_tb]);</span>
<a name="l00306"></a>00306 <span class="stringliteral">                    }</span>
<a name="l00307"></a>00307 <span class="stringliteral">                }</span>
<a name="l00308"></a>00308 <span class="stringliteral">            }</span>
<a name="l00309"></a>00309 <span class="stringliteral">        }</span>
<a name="l00310"></a>00310 <span class="stringliteral"></span>
<a name="l00311"></a>00311 <span class="stringliteral">        /* Compile the template tags into PHP code. */</span>
<a name="l00312"></a>00312 <span class="stringliteral">        $compiled_tags = array();</span>
<a name="l00313"></a>00313 <span class="stringliteral">        for ($i = 0, $for_max = count($template_tags); $i &lt; $for_max; $i++) {</span>
<a name="l00314"></a>00314 <span class="stringliteral">            $this-&gt;_current_line_no += substr_count($text_blocks[$i], "</span>\n<span class="stringliteral">");</span>
<a name="l00315"></a>00315 <span class="stringliteral">            $compiled_tags[] = $this-&gt;_compile_tag($template_tags[$i]);</span>
<a name="l00316"></a>00316 <span class="stringliteral">            $this-&gt;_current_line_no += substr_count($template_tags[$i], "</span>\n<span class="stringliteral">");</span>
<a name="l00317"></a>00317 <span class="stringliteral">        }</span>
<a name="l00318"></a>00318 <span class="stringliteral">        if (count($this-&gt;_tag_stack)&gt;0) {</span>
<a name="l00319"></a>00319 <span class="stringliteral">            list($_open_tag, $_line_no) = end($this-&gt;_tag_stack);</span>
<a name="l00320"></a>00320 <span class="stringliteral">            $this-&gt;_syntax_error("</span>unclosed tag \{$_open_tag} (opened line $_line_no).<span class="stringliteral">", E_USER_ERROR, __FILE__, __LINE__);</span>
<a name="l00321"></a>00321 <span class="stringliteral">            return;</span>
<a name="l00322"></a>00322 <span class="stringliteral">        }</span>
<a name="l00323"></a>00323 <span class="stringliteral"></span>
<a name="l00324"></a>00324 <span class="stringliteral">        /* Reformat $text_blocks between 'strip' and '/strip' tags,</span>
<a name="l00325"></a>00325 <span class="stringliteral">           removing spaces, tabs and newlines. */</span>
<a name="l00326"></a>00326 <span class="stringliteral">        $strip = false;</span>
<a name="l00327"></a>00327 <span class="stringliteral">        for ($i = 0, $for_max = count($compiled_tags); $i &lt; $for_max; $i++) {</span>
<a name="l00328"></a>00328 <span class="stringliteral">            if ($compiled_tags[$i] == '{strip}') {</span>
<a name="l00329"></a>00329 <span class="stringliteral">                $compiled_tags[$i] = '';</span>
<a name="l00330"></a>00330 <span class="stringliteral">                $strip = true;</span>
<a name="l00331"></a>00331 <span class="stringliteral">                /* remove leading whitespaces */</span>
<a name="l00332"></a>00332 <span class="stringliteral">                $text_blocks[$i + 1] = ltrim($text_blocks[$i + 1]);</span>
<a name="l00333"></a>00333 <span class="stringliteral">            }</span>
<a name="l00334"></a>00334 <span class="stringliteral">            if ($strip) {</span>
<a name="l00335"></a>00335 <span class="stringliteral">                /* strip all $text_blocks before the next '/strip' */</span>
<a name="l00336"></a>00336 <span class="stringliteral">                for ($j = $i + 1; $j &lt; $for_max; $j++) {</span>
<a name="l00337"></a>00337 <span class="stringliteral">                    /* remove leading and trailing whitespaces of each line */</span>
<a name="l00338"></a>00338 <span class="stringliteral">                    $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);</span>
<a name="l00339"></a>00339 <span class="stringliteral">                    if ($compiled_tags[$j] == '{/strip}') {                       </span>
<a name="l00340"></a>00340 <span class="stringliteral">                        /* remove trailing whitespaces from the last text_block */</span>
<a name="l00341"></a>00341 <span class="stringliteral">                        $text_blocks[$j] = rtrim($text_blocks[$j]);</span>
<a name="l00342"></a>00342 <span class="stringliteral">                    }</span>
<a name="l00343"></a>00343 <span class="stringliteral">                    $text_blocks[$j] = "</span>&lt;?php echo '<span class="stringliteral">" . strtr($text_blocks[$j], array("</span>'<span class="stringliteral">"=&gt;"</span>\'<span class="stringliteral">", "</span>\\<span class="stringliteral">"=&gt;"</span>\\\\<span class="stringliteral">")) . "</span>'; ?&gt;<span class="stringliteral">";</span>
<a name="l00344"></a>00344 <span class="stringliteral">                    if ($compiled_tags[$j] == '{/strip}') {</span>
<a name="l00345"></a>00345 <span class="stringliteral">                        $compiled_tags[$j] = "</span>\n<span class="stringliteral">"; /* slurped by php, but necessary</span>
<a name="l00346"></a>00346 <span class="stringliteral">                                    if a newline is following the closing strip-tag */</span>
<a name="l00347"></a>00347 <span class="stringliteral">                        $strip = false;</span>
<a name="l00348"></a>00348 <span class="stringliteral">                        $i = $j;</span>
<a name="l00349"></a>00349 <span class="stringliteral">                        break;</span>
<a name="l00350"></a>00350 <span class="stringliteral">                    }</span>
<a name="l00351"></a>00351 <span class="stringliteral">                }</span>
<a name="l00352"></a>00352 <span class="stringliteral">            }</span>
<a name="l00353"></a>00353 <span class="stringliteral">        }</span>
<a name="l00354"></a>00354 <span class="stringliteral">        $compiled_content = '';</span>
<a name="l00355"></a>00355 <span class="stringliteral"></span>
<a name="l00356"></a>00356 <span class="stringliteral">        /* Interleave the compiled contents and text blocks to get the final result. */</span>
<a name="l00357"></a>00357 <span class="stringliteral">        for ($i = 0, $for_max = count($compiled_tags); $i &lt; $for_max; $i++) {</span>
<a name="l00358"></a>00358 <span class="stringliteral">            if ($compiled_tags[$i] == '') {</span>
<a name="l00359"></a>00359 <span class="stringliteral">                // tag result empty, remove first newline from following text block</span>
<a name="l00360"></a>00360 <span class="stringliteral">                $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);</span>
<a name="l00361"></a>00361 <span class="stringliteral">            }</span>
<a name="l00362"></a>00362 <span class="stringliteral">            $compiled_content .= $text_blocks[$i].$compiled_tags[$i];</span>
<a name="l00363"></a>00363 <span class="stringliteral">        }</span>
<a name="l00364"></a>00364 <span class="stringliteral">        $compiled_content .= $text_blocks[$i];</span>
<a name="l00365"></a>00365 <span class="stringliteral"></span>
<a name="l00366"></a>00366 <span class="stringliteral">        // remove \n from the end of the file, if any</span>
<a name="l00367"></a>00367 <span class="stringliteral">        if (strlen($compiled_content) &amp;&amp; (substr($compiled_content, -1) == "</span>\n<span class="stringliteral">") ) {</span>
<a name="l00368"></a>00368 <span class="stringliteral">            $compiled_content = substr($compiled_content, 0, -1);</span>
<a name="l00369"></a>00369 <span class="stringliteral">        }</span>
<a name="l00370"></a>00370 <span class="stringliteral"></span>
<a name="l00371"></a>00371 <span class="stringliteral">        if (!empty($this-&gt;_cache_serial)) {</span>
<a name="l00372"></a>00372 <span class="stringliteral">            $compiled_content = "</span>&lt;?php \$this-&gt;_cache_serials['<span class="stringliteral">".$this-&gt;_cache_include."</span>'] = '<span class="stringliteral">".$this-&gt;_cache_serial."</span>'; ?&gt;<span class="stringliteral">" . $compiled_content;</span>
<a name="l00373"></a>00373 <span class="stringliteral">        }</span>
<a name="l00374"></a>00374 <span class="stringliteral"></span>
<a name="l00375"></a>00375 <span class="stringliteral">        // remove unnecessary close/open tags</span>
<a name="l00376"></a>00376 <span class="stringliteral">        $compiled_content = preg_replace('~\?&gt;\n?&lt;\?php~', '', $compiled_content);</span>
<a name="l00377"></a>00377 <span class="stringliteral"></span>
<a name="l00378"></a>00378 <span class="stringliteral">        // run compiled template through postfilter functions</span>
<a name="l00379"></a>00379 <span class="stringliteral">        if (count($this-&gt;_plugins['postfilter']) &gt; 0) {</span>
<a name="l00380"></a>00380 <span class="stringliteral">            foreach ($this-&gt;_plugins['postfilter'] as $filter_name =&gt; $postfilter) {</span>
<a name="l00381"></a>00381 <span class="stringliteral">                if ($postfilter === false) continue;</span>
<a name="l00382"></a>00382 <span class="stringliteral">                if ($postfilter[3] || is_callable($postfilter[0])) {</span>
<a name="l00383"></a>00383 <span class="stringliteral">                    $compiled_content = call_user_func_array($postfilter[0],</span>
<a name="l00384"></a>00384 <span class="stringliteral">                                                              array($compiled_content, &amp;$this));</span>
<a name="l00385"></a>00385 <span class="stringliteral">                    $this-&gt;_plugins['postfilter'][$filter_name][3] = true;</span>
<a name="l00386"></a>00386 <span class="stringliteral">                } else {</span>
<a name="l00387"></a>00387 <span class="stringliteral">                    $this-&gt;_trigger_fatal_error("</span><a class="code" href="classSmarty.html">Smarty</a> plugin error: postfilter '$filter_name' is not implemented<span class="stringliteral">");</span>
<a name="l00388"></a>00388 <span class="stringliteral">                }</span>
<a name="l00389"></a>00389 <span class="stringliteral">            }</span>
<a name="l00390"></a>00390 <span class="stringliteral">        }</span>
<a name="l00391"></a>00391 <span class="stringliteral"></span>
<a name="l00392"></a>00392 <span class="stringliteral">        // put header at the top of the compiled template</span>
<a name="l00393"></a>00393 <span class="stringliteral">        $template_header = "</span>&lt;?php <span class="comment">/* Smarty version ".$this-&gt;_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";</span>
<a name="l00394"></a>00394 <span class="comment">        $template_header .= "         compiled from ".strtr(urlencode($resource_name), array('%2F'=&gt;'/', '%3A'=&gt;':'))." */</span> ?&gt;\n<span class="stringliteral">";</span>
<a name="l00395"></a>00395 <span class="stringliteral"></span>
<a name="l00396"></a>00396 <span class="stringliteral">        /* Emit code to load needed plugins. */</span>
<a name="l00397"></a>00397 <span class="stringliteral">        $this-&gt;_plugins_code = '';</span>
<a name="l00398"></a>00398 <span class="stringliteral">        if (count($this-&gt;_plugin_info)) {</span>
<a name="l00399"></a>00399 <span class="stringliteral">            $_plugins_params = "</span>array('plugins' =&gt; array(<span class="stringliteral">";</span>
<a name="l00400"></a>00400 <span class="stringliteral">            foreach ($this-&gt;_plugin_info as $plugin_type =&gt; $plugins) {</span>
<a name="l00401"></a>00401 <span class="stringliteral">                foreach ($plugins as $plugin_name =&gt; $plugin_info) {</span>
<a name="l00402"></a>00402 <span class="stringliteral">                    $_plugins_params .= "</span>array('$plugin_type', '$plugin_name', '<span class="stringliteral">" . strtr($plugin_info[0], array("</span>'<span class="stringliteral">" =&gt; "</span>\\'<span class="stringliteral">", "</span>\\<span class="stringliteral">" =&gt; "</span>\\\\<span class="stringliteral">")) . "</span>', $plugin_info[1], <span class="stringliteral">";</span>
<a name="l00403"></a>00403 <span class="stringliteral">                    $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),';</span>
<a name="l00404"></a>00404 <span class="stringliteral">                }</span>
<a name="l00405"></a>00405 <span class="stringliteral">            }</span>
<a name="l00406"></a>00406 <span class="stringliteral">            $_plugins_params .= '))';</span>
<a name="l00407"></a>00407 <span class="stringliteral">            $plugins_code = "</span>&lt;?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?&gt;\n<span class="stringliteral">";</span>
<a name="l00408"></a>00408 <span class="stringliteral">            $template_header .= $plugins_code;</span>
<a name="l00409"></a>00409 <span class="stringliteral">            $this-&gt;_plugin_info = array();</span>
<a name="l00410"></a>00410 <span class="stringliteral">            $this-&gt;_plugins_code = $plugins_code;</span>
<a name="l00411"></a>00411 <span class="stringliteral">        }</span>
<a name="l00412"></a>00412 <span class="stringliteral"></span>
<a name="l00413"></a>00413 <span class="stringliteral">        if ($this-&gt;_init_smarty_vars) {</span>
<a name="l00414"></a>00414 <span class="stringliteral">            $template_header .= "</span>&lt;?php require_once(SMARTY_CORE_DIR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?&gt;\n<span class="stringliteral">";</span>
<a name="l00415"></a>00415 <span class="stringliteral">            $this-&gt;_init_smarty_vars = false;</span>
<a name="l00416"></a>00416 <span class="stringliteral">        }</span>
<a name="l00417"></a>00417 <span class="stringliteral"></span>
<a name="l00418"></a>00418 <span class="stringliteral">        $compiled_content = $template_header . $compiled_content;</span>
<a name="l00419"></a>00419 <span class="stringliteral">        return true;</span>
<a name="l00420"></a>00420 <span class="stringliteral">    }</span>
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="f4169d507c719a53677048d51f61090d"></a><!-- doxytag: member="Smarty_Compiler::_compile_foreach_start" ref="f4169d507c719a53677048d51f61090d" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_foreach_start           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {foreach . 
<p>
..} tag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01148">1148</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01149"></a>01149     {
<a name="l01150"></a>01150         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l01151"></a>01151         $arg_list = array();
<a name="l01152"></a>01152 
<a name="l01153"></a>01153         <span class="keywordflow">if</span> (empty($attrs['from'])) {
<a name="l01154"></a>01154             <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"foreach: missing 'from' attribute"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01155"></a>01155         }
<a name="l01156"></a>01156         $from = $attrs['from'];
<a name="l01157"></a>01157 
<a name="l01158"></a>01158         <span class="keywordflow">if</span> (empty($attrs['item'])) {
<a name="l01159"></a>01159             <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"foreach: missing 'item' attribute"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01160"></a>01160         }
<a name="l01161"></a>01161         $item = $this-&gt;<a class="code" href="classSmarty.html#2563e0d1649fe1cd693b9f9ad4ef2f43">_dequote</a>($attrs['item']);
<a name="l01162"></a>01162         <span class="keywordflow">if</span> (!preg_match('~^\w+$~', $item)) {
<a name="l01163"></a>01163             <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"'foreach: item' must be a variable name (literal string)"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01164"></a>01164         }
<a name="l01165"></a>01165 
<a name="l01166"></a>01166         <span class="keywordflow">if</span> (isset($attrs['key'])) {
<a name="l01167"></a>01167             $key  = $this-&gt;<a class="code" href="classSmarty.html#2563e0d1649fe1cd693b9f9ad4ef2f43">_dequote</a>($attrs['key']);
<a name="l01168"></a>01168             <span class="keywordflow">if</span> (!preg_match('~^\w+$~', $key)) {
<a name="l01169"></a>01169                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"foreach: 'key' must to be a variable name (literal string)"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01170"></a>01170             }
<a name="l01171"></a>01171             $key_part = <span class="stringliteral">"\$this-&gt;_tpl_vars['$key'] =&gt; "</span>;
<a name="l01172"></a>01172         } <span class="keywordflow">else</span> {
<a name="l01173"></a>01173             $key = null;
<a name="l01174"></a>01174             $key_part = '';
<a name="l01175"></a>01175         }
<a name="l01176"></a>01176 
<a name="l01177"></a>01177         <span class="keywordflow">if</span> (isset($attrs['name'])) {
<a name="l01178"></a>01178             $name = $attrs['name'];
<a name="l01179"></a>01179         } <span class="keywordflow">else</span> {
<a name="l01180"></a>01180             $name = null;
<a name="l01181"></a>01181         }
<a name="l01182"></a>01182 
<a name="l01183"></a>01183         $output = '&lt;?php ';
<a name="l01184"></a>01184         $output .= <span class="stringliteral">"\$_from = $from; if (!is_array(\$_from) &amp;&amp; !is_object(\$_from)) { settype(\$_from, 'array'); }"</span>;
<a name="l01185"></a>01185         <span class="keywordflow">if</span> (isset($name)) {
<a name="l01186"></a>01186             $foreach_props = <span class="stringliteral">"\$this-&gt;_foreach[$name]"</span>;
<a name="l01187"></a>01187             $output .= <span class="stringliteral">"{$foreach_props} = array('total' =&gt; count(\$_from), 'iteration' =&gt; 0);\n"</span>;
<a name="l01188"></a>01188             $output .= <span class="stringliteral">"if ({$foreach_props}['total'] &gt; 0):\n"</span>;
<a name="l01189"></a>01189             $output .= <span class="stringliteral">"    foreach (\$_from as $key_part\$this-&gt;_tpl_vars['$item']):\n"</span>;
<a name="l01190"></a>01190             $output .= <span class="stringliteral">"        {$foreach_props}['iteration']++;\n"</span>;
<a name="l01191"></a>01191         } <span class="keywordflow">else</span> {
<a name="l01192"></a>01192             $output .= <span class="stringliteral">"if (count(\$_from)):\n"</span>;
<a name="l01193"></a>01193             $output .= <span class="stringliteral">"    foreach (\$_from as $key_part\$this-&gt;_tpl_vars['$item']):\n"</span>;
<a name="l01194"></a>01194         }
<a name="l01195"></a>01195         $output .= '?&gt;';
<a name="l01196"></a>01196 
<a name="l01197"></a>01197         <span class="keywordflow">return</span> $output;
<a name="l01198"></a>01198     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="58d511ec4be2cdd98a9cd9576816fa21"></a><!-- doxytag: member="Smarty_Compiler::_compile_if_tag" ref="58d511ec4be2cdd98a9cd9576816fa21" args="($tag_args, $elseif=false)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_if_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_args</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>elseif</em> = <code>false</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {if . 
<p>
..} tag<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>boolean</em>&nbsp;</td><td>$elseif if true, uses elseif instead of if </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01244">1244</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01245"></a>01245     {
<a name="l01246"></a>01246 
<a name="l01247"></a>01247         <span class="comment">/* Tokenize args for 'if' tag. */</span>
<a name="l01248"></a>01248         preg_match_all('~(?&gt;
<a name="l01249"></a>01249                 ' . $this-&gt;_obj_call_regexp . '(?:' . $this-&gt;_mod_regexp . '*)? | # valid object call
<a name="l01250"></a>01250                 ' . $this-&gt;_var_regexp . '(?:' . $this-&gt;_mod_regexp . '*)?    | # var or quoted string
<a name="l01251"></a>01251                 \-?0[xX][0-9a-fA-F]+|\-?\d+(?:\.\d+)?|\.\d+|!==|===|==|!=|&lt;&gt;|&lt;&lt;|&gt;&gt;|&lt;=|&gt;=|\&amp;\&amp;|\|\||\(|\)|,|\!|\^|=|\&amp;|\~|&lt;|&gt;|\||\%|\+|\-|\/|\*|\@    | # valid non-word token
<a name="l01252"></a>01252                 \b\w+\b                                                        | # valid word token
<a name="l01253"></a>01253                 \S+                                                           # anything <span class="keywordflow">else</span>
<a name="l01254"></a>01254                 )~x', $tag_args, $match);
<a name="l01255"></a>01255 
<a name="l01256"></a>01256         $tokens = $match[0];
<a name="l01257"></a>01257 
<a name="l01258"></a>01258         <span class="keywordflow">if</span>(empty($tokens)) {
<a name="l01259"></a>01259             $_error_msg = $elseif ? <span class="stringliteral">"'elseif'"</span> : <span class="stringliteral">"'if'"</span>;
<a name="l01260"></a>01260             $_error_msg .= ' statement requires arguments'; 
<a name="l01261"></a>01261             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01262"></a>01262         }
<a name="l01263"></a>01263             
<a name="l01264"></a>01264                 
<a name="l01265"></a>01265         <span class="comment">// make sure we have balanced parenthesis</span>
<a name="l01266"></a>01266         $token_count = array_count_values($tokens);
<a name="l01267"></a>01267         <span class="keywordflow">if</span>(isset($token_count[<span class="charliteral">'('</span>]) &amp;&amp; $token_count[<span class="charliteral">'('</span>] != $token_count[<span class="charliteral">')'</span>]) {
<a name="l01268"></a>01268             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unbalanced parenthesis in if statement"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01269"></a>01269         }
<a name="l01270"></a>01270 
<a name="l01271"></a>01271         $is_arg_stack = array();
<a name="l01272"></a>01272 
<a name="l01273"></a>01273         <span class="keywordflow">for</span> ($i = 0; $i &lt; count($tokens); $i++) {
<a name="l01274"></a>01274 
<a name="l01275"></a>01275             $token = &amp;$tokens[$i];
<a name="l01276"></a>01276 
<a name="l01277"></a>01277             <span class="keywordflow">switch</span> (strtolower($token)) {
<a name="l01278"></a>01278                 <span class="keywordflow">case</span> <span class="charliteral">'!'</span>:
<a name="l01279"></a>01279                 <span class="keywordflow">case</span> <span class="charliteral">'%'</span>:
<a name="l01280"></a>01280                 <span class="keywordflow">case</span> '!==':
<a name="l01281"></a>01281                 <span class="keywordflow">case</span> '==':
<a name="l01282"></a>01282                 <span class="keywordflow">case</span> '===':
<a name="l01283"></a>01283                 <span class="keywordflow">case</span> <span class="charliteral">'&gt;'</span>:
<a name="l01284"></a>01284                 <span class="keywordflow">case</span> <span class="charliteral">'&lt;'</span>:
<a name="l01285"></a>01285                 <span class="keywordflow">case</span> '!=':
<a name="l01286"></a>01286                 <span class="keywordflow">case</span> '&lt;&gt;':
<a name="l01287"></a>01287                 <span class="keywordflow">case</span> '&lt;&lt;':
<a name="l01288"></a>01288                 <span class="keywordflow">case</span> '&gt;&gt;':
<a name="l01289"></a>01289                 <span class="keywordflow">case</span> '&lt;=':
<a name="l01290"></a>01290                 <span class="keywordflow">case</span> '&gt;=':
<a name="l01291"></a>01291                 <span class="keywordflow">case</span> '&amp;&amp;':
<a name="l01292"></a>01292                 <span class="keywordflow">case</span> '||':
<a name="l01293"></a>01293                 <span class="keywordflow">case</span> <span class="charliteral">'|'</span>:
<a name="l01294"></a>01294                 <span class="keywordflow">case</span> <span class="charliteral">'^'</span>:
<a name="l01295"></a>01295                 <span class="keywordflow">case</span> <span class="charliteral">'&amp;'</span>:
<a name="l01296"></a>01296                 <span class="keywordflow">case</span> <span class="charliteral">'~'</span>:
<a name="l01297"></a>01297                 <span class="keywordflow">case</span> <span class="charliteral">')'</span>:
<a name="l01298"></a>01298                 <span class="keywordflow">case</span> <span class="charliteral">','</span>:
<a name="l01299"></a>01299                 <span class="keywordflow">case</span> <span class="charliteral">'+'</span>:
<a name="l01300"></a>01300                 <span class="keywordflow">case</span> <span class="charliteral">'-'</span>:
<a name="l01301"></a>01301                 <span class="keywordflow">case</span> <span class="charliteral">'*'</span>:
<a name="l01302"></a>01302                 <span class="keywordflow">case</span> <span class="charliteral">'/'</span>:
<a name="l01303"></a>01303                 <span class="keywordflow">case</span> <span class="charliteral">'@'</span>:
<a name="l01304"></a>01304                     <span class="keywordflow">break</span>;
<a name="l01305"></a>01305 
<a name="l01306"></a>01306                 <span class="keywordflow">case</span> 'eq':
<a name="l01307"></a>01307                     $token = '==';
<a name="l01308"></a>01308                     <span class="keywordflow">break</span>;
<a name="l01309"></a>01309 
<a name="l01310"></a>01310                 <span class="keywordflow">case</span> 'ne':
<a name="l01311"></a>01311                 <span class="keywordflow">case</span> 'neq':
<a name="l01312"></a>01312                     $token = '!=';
<a name="l01313"></a>01313                     <span class="keywordflow">break</span>;
<a name="l01314"></a>01314 
<a name="l01315"></a>01315                 <span class="keywordflow">case</span> 'lt':
<a name="l01316"></a>01316                     $token = <span class="charliteral">'&lt;'</span>;
<a name="l01317"></a>01317                     <span class="keywordflow">break</span>;
<a name="l01318"></a>01318 
<a name="l01319"></a>01319                 <span class="keywordflow">case</span> 'le':
<a name="l01320"></a>01320                 <span class="keywordflow">case</span> 'lte':
<a name="l01321"></a>01321                     $token = '&lt;=';
<a name="l01322"></a>01322                     <span class="keywordflow">break</span>;
<a name="l01323"></a>01323 
<a name="l01324"></a>01324                 <span class="keywordflow">case</span> 'gt':
<a name="l01325"></a>01325                     $token = <span class="charliteral">'&gt;'</span>;
<a name="l01326"></a>01326                     <span class="keywordflow">break</span>;
<a name="l01327"></a>01327 
<a name="l01328"></a>01328                 <span class="keywordflow">case</span> 'ge':
<a name="l01329"></a>01329                 <span class="keywordflow">case</span> 'gte':
<a name="l01330"></a>01330                     $token = '&gt;=';
<a name="l01331"></a>01331                     <span class="keywordflow">break</span>;
<a name="l01332"></a>01332 
<a name="l01333"></a>01333                 <span class="keywordflow">case</span> 'and':
<a name="l01334"></a>01334                     $token = '&amp;&amp;';
<a name="l01335"></a>01335                     <span class="keywordflow">break</span>;
<a name="l01336"></a>01336 
<a name="l01337"></a>01337                 <span class="keywordflow">case</span> 'or':
<a name="l01338"></a>01338                     $token = '||';
<a name="l01339"></a>01339                     <span class="keywordflow">break</span>;
<a name="l01340"></a>01340 
<a name="l01341"></a>01341                 <span class="keywordflow">case</span> 'not':
<a name="l01342"></a>01342                     $token = <span class="charliteral">'!'</span>;
<a name="l01343"></a>01343                     <span class="keywordflow">break</span>;
<a name="l01344"></a>01344 
<a name="l01345"></a>01345                 <span class="keywordflow">case</span> 'mod':
<a name="l01346"></a>01346                     $token = <span class="charliteral">'%'</span>;
<a name="l01347"></a>01347                     <span class="keywordflow">break</span>;
<a name="l01348"></a>01348 
<a name="l01349"></a>01349                 <span class="keywordflow">case</span> <span class="charliteral">'('</span>:
<a name="l01350"></a>01350                     array_push($is_arg_stack, $i);
<a name="l01351"></a>01351                     <span class="keywordflow">break</span>;
<a name="l01352"></a>01352 
<a name="l01353"></a>01353                 <span class="keywordflow">case</span> 'is':
<a name="l01354"></a>01354                     <span class="comment">/* If last token was a ')', we operate on the parenthesized</span>
<a name="l01355"></a>01355 <span class="comment">                       expression. The start of the expression is on the stack.</span>
<a name="l01356"></a>01356 <span class="comment">                       Otherwise, we operate on the last encountered token. */</span>
<a name="l01357"></a>01357                     <span class="keywordflow">if</span> ($tokens[$i-1] == <span class="charliteral">')'</span>)
<a name="l01358"></a>01358                         $is_arg_start = array_pop($is_arg_stack);
<a name="l01359"></a>01359                     <span class="keywordflow">else</span>
<a name="l01360"></a>01360                         $is_arg_start = $i-1;
<a name="l01361"></a>01361                     <span class="comment">/* Construct the argument for 'is' expression, so it knows</span>
<a name="l01362"></a>01362 <span class="comment">                       what to operate on. */</span>
<a name="l01363"></a>01363                     $is_arg = implode(<span class="charliteral">' '</span>, array_slice($tokens, $is_arg_start, $i - $is_arg_start));
<a name="l01364"></a>01364 
<a name="l01365"></a>01365                     <span class="comment">/* Pass all tokens from next one until the end to the</span>
<a name="l01366"></a>01366 <span class="comment">                       'is' expression parsing function. The function will</span>
<a name="l01367"></a>01367 <span class="comment">                       return modified tokens, where the first one is the result</span>
<a name="l01368"></a>01368 <span class="comment">                       of the 'is' expression and the rest are the tokens it</span>
<a name="l01369"></a>01369 <span class="comment">                       didn't touch. */</span>
<a name="l01370"></a>01370                     $new_tokens = $this-&gt;<a class="code" href="classSmarty__Compiler.html#af4aec862e7a94d4217382dceae72b50">_parse_is_expr</a>($is_arg, array_slice($tokens, $i+1));
<a name="l01371"></a>01371 
<a name="l01372"></a>01372                     <span class="comment">/* Replace the old tokens with the new ones. */</span>
<a name="l01373"></a>01373                     array_splice($tokens, $is_arg_start, count($tokens), $new_tokens);
<a name="l01374"></a>01374 
<a name="l01375"></a>01375                     <span class="comment">/* Adjust argument start so that it won't change from the</span>
<a name="l01376"></a>01376 <span class="comment">                       current position for the next iteration. */</span>
<a name="l01377"></a>01377                     $i = $is_arg_start;
<a name="l01378"></a>01378                     <span class="keywordflow">break</span>;
<a name="l01379"></a>01379 
<a name="l01380"></a>01380                 <span class="keywordflow">default</span>:
<a name="l01381"></a>01381                     <span class="keywordflow">if</span>(preg_match('~^' . $this-&gt;_func_regexp . '$~', $token) ) {
<a name="l01382"></a>01382                             <span class="comment">// function call</span>
<a name="l01383"></a>01383                             <span class="keywordflow">if</span>($this-&gt;security &amp;&amp;
<a name="l01384"></a>01384                                !in_array($token, $this-&gt;security_settings['IF_FUNCS'])) {
<a name="l01385"></a>01385                                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"(secure mode) '$token' not allowed in if statement"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01386"></a>01386                             }
<a name="l01387"></a>01387                     } elseif(preg_match('~^' . $this-&gt;_var_regexp . '$~', $token) &amp;&amp; (strpos('+-*/^%&amp;|', substr($token, -1)) === <span class="keyword">false</span>) &amp;&amp; isset($tokens[$i+1]) &amp;&amp; $tokens[$i+1] == <span class="charliteral">'('</span>) {
<a name="l01388"></a>01388                         <span class="comment">// variable function call</span>
<a name="l01389"></a>01389                         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"variable function call '$token' not allowed in if statement"</span>, E_USER_ERROR, __FILE__, __LINE__);                      
<a name="l01390"></a>01390                     } elseif(preg_match('~^' . $this-&gt;_obj_call_regexp . <span class="charliteral">'|'</span> . $this-&gt;_var_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $token)) {
<a name="l01391"></a>01391                         <span class="comment">// object or variable</span>
<a name="l01392"></a>01392                         $token = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($token);
<a name="l01393"></a>01393                     } elseif(is_numeric($token)) {
<a name="l01394"></a>01394                         <span class="comment">// number, skip it</span>
<a name="l01395"></a>01395                     } <span class="keywordflow">else</span> {
<a name="l01396"></a>01396                         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unidentified token '$token'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01397"></a>01397                     }
<a name="l01398"></a>01398                     <span class="keywordflow">break</span>;
<a name="l01399"></a>01399             }
<a name="l01400"></a>01400         }
<a name="l01401"></a>01401 
<a name="l01402"></a>01402         <span class="keywordflow">if</span> ($elseif)
<a name="l01403"></a>01403             <span class="keywordflow">return</span> '&lt;?php elseif ('.implode(<span class="charliteral">' '</span>, $tokens).'): ?&gt;';
<a name="l01404"></a>01404         <span class="keywordflow">else</span>
<a name="l01405"></a>01405             <span class="keywordflow">return</span> '&lt;?php <span class="keywordflow">if</span> ('.implode(<span class="charliteral">' '</span>, $tokens).'): ?&gt;';
<a name="l01406"></a>01406     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="120c8620070c5417709f16896958c7bc"></a><!-- doxytag: member="Smarty_Compiler::_compile_include_php_tag" ref="120c8620070c5417709f16896958c7bc" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_include_php_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {include . 
<p>
..} tag<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01011">1011</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01012"></a>01012     {
<a name="l01013"></a>01013         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l01014"></a>01014 
<a name="l01015"></a>01015         <span class="keywordflow">if</span> (empty($attrs['file'])) {
<a name="l01016"></a>01016             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"missing 'file' attribute in include_php tag"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01017"></a>01017         }
<a name="l01018"></a>01018 
<a name="l01019"></a>01019         $assign_var = (empty($attrs['<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>'])) ? '' : $this-&gt;<a class="code" href="classSmarty.html#2563e0d1649fe1cd693b9f9ad4ef2f43">_dequote</a>($attrs['<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>']);
<a name="l01020"></a>01020         $once_var = (empty($attrs['once']) || $attrs['once']=='<span class="keyword">false</span>') ? '<span class="keyword">false</span>' : '<span class="keyword">true</span>';
<a name="l01021"></a>01021 
<a name="l01022"></a>01022         $arg_list = array();
<a name="l01023"></a>01023         foreach($attrs as $arg_name =&gt; $arg_value) {
<a name="l01024"></a>01024             <span class="keywordflow">if</span>($arg_name != 'file' AND $arg_name != 'once' AND $arg_name != 'assign') {
<a name="l01025"></a>01025                 <span class="keywordflow">if</span>(is_bool($arg_value))
<a name="l01026"></a>01026                     $arg_value = $arg_value ? '<span class="keyword">true</span>' : '<span class="keyword">false</span>';
<a name="l01027"></a>01027                 $arg_list[] = <span class="stringliteral">"'$arg_name' =&gt; $arg_value"</span>;
<a name="l01028"></a>01028             }
<a name="l01029"></a>01029         }
<a name="l01030"></a>01030 
<a name="l01031"></a>01031         $_params = <span class="stringliteral">"array('smarty_file' =&gt; "</span> . $attrs['file'] . <span class="stringliteral">", 'smarty_assign' =&gt; '$assign_var', 'smarty_once' =&gt; $once_var, 'smarty_include_vars' =&gt; array("</span>.implode(<span class="charliteral">','</span>, $arg_list).<span class="stringliteral">"))"</span>;
<a name="l01032"></a>01032 
<a name="l01033"></a>01033         <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php require_once(SMARTY_CORE_DIR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?&gt;"</span> . $this-&gt;_additional_newline;
<a name="l01034"></a>01034     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="78d8b41387b488cf352e4a638023e5ed"></a><!-- doxytag: member="Smarty_Compiler::_compile_include_tag" ref="78d8b41387b488cf352e4a638023e5ed" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_include_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {include . 
<p>
..} tag<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00958">958</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00959"></a>00959     {
<a name="l00960"></a>00960         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l00961"></a>00961         $arg_list = array();
<a name="l00962"></a>00962 
<a name="l00963"></a>00963         <span class="keywordflow">if</span> (empty($attrs['file'])) {
<a name="l00964"></a>00964             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"missing 'file' attribute in include tag"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l00965"></a>00965         }
<a name="l00966"></a>00966 
<a name="l00967"></a>00967         foreach ($attrs as $arg_name =&gt; $arg_value) {
<a name="l00968"></a>00968             <span class="keywordflow">if</span> ($arg_name == 'file') {
<a name="l00969"></a>00969                 $include_file = $arg_value;
<a name="l00970"></a>00970                 <span class="keywordflow">continue</span>;
<a name="l00971"></a>00971             } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($arg_name == '<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>') {
<a name="l00972"></a>00972                 $assign_var = $arg_value;
<a name="l00973"></a>00973                 <span class="keywordflow">continue</span>;
<a name="l00974"></a>00974             }
<a name="l00975"></a>00975             <span class="keywordflow">if</span> (is_bool($arg_value))
<a name="l00976"></a>00976                 $arg_value = $arg_value ? '<span class="keyword">true</span>' : '<span class="keyword">false</span>';
<a name="l00977"></a>00977             $arg_list[] = <span class="stringliteral">"'$arg_name' =&gt; $arg_value"</span>;
<a name="l00978"></a>00978         }
<a name="l00979"></a>00979 
<a name="l00980"></a>00980         $output = '&lt;?php ';
<a name="l00981"></a>00981 
<a name="l00982"></a>00982         <span class="keywordflow">if</span> (isset($assign_var)) {
<a name="l00983"></a>00983             $output .= <span class="stringliteral">"ob_start();\n"</span>;
<a name="l00984"></a>00984         }
<a name="l00985"></a>00985 
<a name="l00986"></a>00986         $output .=
<a name="l00987"></a>00987             <span class="stringliteral">"\$_smarty_tpl_vars = \$this-&gt;_tpl_vars;\n"</span>;
<a name="l00988"></a>00988 
<a name="l00989"></a>00989 
<a name="l00990"></a>00990         $_params = <span class="stringliteral">"array('smarty_include_tpl_file' =&gt; "</span> . $include_file . <span class="stringliteral">", 'smarty_include_vars' =&gt; array("</span>.implode(<span class="charliteral">','</span>, (array)$arg_list).<span class="stringliteral">"))"</span>;
<a name="l00991"></a>00991         $output .= <span class="stringliteral">"\$this-&gt;_smarty_include($_params);\n"</span> .
<a name="l00992"></a>00992         <span class="stringliteral">"\$this-&gt;_tpl_vars = \$_smarty_tpl_vars;\n"</span> .
<a name="l00993"></a>00993         <span class="stringliteral">"unset(\$_smarty_tpl_vars);\n"</span>;
<a name="l00994"></a>00994 
<a name="l00995"></a>00995         <span class="keywordflow">if</span> (isset($assign_var)) {
<a name="l00996"></a>00996             $output .= <span class="stringliteral">"\$this-&gt;assign("</span> . $assign_var . <span class="stringliteral">", ob_get_contents()); ob_end_clean();\n"</span>;
<a name="l00997"></a>00997         }
<a name="l00998"></a>00998 
<a name="l00999"></a>00999         $output .= ' ?&gt;';
<a name="l01000"></a>01000 
<a name="l01001"></a>01001         <span class="keywordflow">return</span> $output;
<a name="l01002"></a>01002 
<a name="l01003"></a>01003     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="4a9b22720c848862c5719a116246955d"></a><!-- doxytag: member="Smarty_Compiler::_compile_insert_tag" ref="4a9b22720c848862c5719a116246955d" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_insert_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {insert . 
<p>
..} tag<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00924">924</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00925"></a>00925     {
<a name="l00926"></a>00926         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l00927"></a>00927         $name = $this-&gt;<a class="code" href="classSmarty.html#2563e0d1649fe1cd693b9f9ad4ef2f43">_dequote</a>($attrs['name']);
<a name="l00928"></a>00928 
<a name="l00929"></a>00929         <span class="keywordflow">if</span> (empty($name)) {
<a name="l00930"></a>00930             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"missing insert name"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l00931"></a>00931         }
<a name="l00932"></a>00932 
<a name="l00933"></a>00933         <span class="keywordflow">if</span> (!empty($attrs['script'])) {
<a name="l00934"></a>00934             $delayed_loading = <span class="keyword">true</span>;
<a name="l00935"></a>00935         } <span class="keywordflow">else</span> {
<a name="l00936"></a>00936             $delayed_loading = <span class="keyword">false</span>;
<a name="l00937"></a>00937         }
<a name="l00938"></a>00938 
<a name="l00939"></a>00939         foreach ($attrs as $arg_name =&gt; $arg_value) {
<a name="l00940"></a>00940             <span class="keywordflow">if</span> (is_bool($arg_value))
<a name="l00941"></a>00941                 $arg_value = $arg_value ? '<span class="keyword">true</span>' : '<span class="keyword">false</span>';
<a name="l00942"></a>00942             $arg_list[] = <span class="stringliteral">"'$arg_name' =&gt; $arg_value"</span>;
<a name="l00943"></a>00943         }
<a name="l00944"></a>00944 
<a name="l00945"></a>00945         $this-&gt;<a class="code" href="classSmarty__Compiler.html#8dc53786beac8f4ca7c8d86cf1bbbd95">_add_plugin</a>('insert', $name, $delayed_loading);
<a name="l00946"></a>00946 
<a name="l00947"></a>00947         $_params = <span class="stringliteral">"array('args' =&gt; array("</span>.implode(', ', (array)$arg_list).<span class="stringliteral">"))"</span>;
<a name="l00948"></a>00948 
<a name="l00949"></a>00949         <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?&gt;"</span> . $this-&gt;_additional_newline;
<a name="l00950"></a>00950     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="302b33495a918bef95258bfb0285a30c"></a><!-- doxytag: member="Smarty_Compiler::_compile_plugin_call" ref="302b33495a918bef95258bfb0285a30c" args="($type, $name)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_plugin_call           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compiles call to plugin of type $type with name $name returns a string containing the function-name or method call without the paramter-list that would have follow to make the call valid php-syntax 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$name </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02137">2137</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02137"></a>02137                                                 {
<a name="l02138"></a>02138         <span class="keywordflow">if</span> (isset($this-&gt;_plugins[$type][$name])) {
<a name="l02139"></a>02139             <span class="comment">/* plugin loaded */</span>
<a name="l02140"></a>02140             <span class="keywordflow">if</span> (is_array($this-&gt;_plugins[$type][$name][0])) {
<a name="l02141"></a>02141                 <span class="keywordflow">return</span> ((is_object($this-&gt;_plugins[$type][$name][0][0])) ?
<a name="l02142"></a>02142                         <span class="stringliteral">"\$this-&gt;_plugins['$type']['$name'][0][0]-&gt;"</span>    <span class="comment">/* method callback */</span>
<a name="l02143"></a>02143                         : (string)($this-&gt;_plugins[$type][$name][0][0]).'::'    <span class="comment">/* class callback */</span>
<a name="l02144"></a>02144                        ). $this-&gt;_plugins[$type][$name][0][1];
<a name="l02145"></a>02145 
<a name="l02146"></a>02146             } <span class="keywordflow">else</span> {
<a name="l02147"></a>02147                 <span class="comment">/* function callback */</span>
<a name="l02148"></a>02148                 <span class="keywordflow">return</span> $this-&gt;_plugins[$type][$name][0];
<a name="l02149"></a>02149 
<a name="l02150"></a>02150             }
<a name="l02151"></a>02151         } <span class="keywordflow">else</span> {
<a name="l02152"></a>02152             <span class="comment">/* plugin not loaded -&gt; auto-loadable-plugin */</span>
<a name="l02153"></a>02153             <span class="keywordflow">return</span> 'smarty_'.$type.<span class="charliteral">'_'</span>.$name;
<a name="l02154"></a>02154 
<a name="l02155"></a>02155         }
<a name="l02156"></a>02156     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="4768af997ac7a6ca06b6f426b9bd39cf"></a><!-- doxytag: member="Smarty_Compiler::_compile_registered_object_tag" ref="4768af997ac7a6ca06b6f426b9bd39cf" args="($tag_command, $attrs, $tag_modifier)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_registered_object_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_command</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>attrs</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tag_modifier</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile a registered object tag 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_command </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$attrs </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_modifier </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00832">832</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00833"></a>00833     {
<a name="l00834"></a>00834         <span class="keywordflow">if</span> (substr($tag_command, 0, 1) == <span class="charliteral">'/'</span>) {
<a name="l00835"></a>00835             $start_tag = <span class="keyword">false</span>;
<a name="l00836"></a>00836             $tag_command = substr($tag_command, 1);
<a name="l00837"></a>00837         } <span class="keywordflow">else</span> {
<a name="l00838"></a>00838             $start_tag = <span class="keyword">true</span>;
<a name="l00839"></a>00839         }
<a name="l00840"></a>00840 
<a name="l00841"></a>00841         list($object, $obj_comp) = explode('-&gt;', $tag_command);
<a name="l00842"></a>00842 
<a name="l00843"></a>00843         $arg_list = array();
<a name="l00844"></a>00844         <span class="keywordflow">if</span>(count($attrs)) {
<a name="l00845"></a>00845             $_assign_var = <span class="keyword">false</span>;
<a name="l00846"></a>00846             foreach ($attrs as $arg_name =&gt; $arg_value) {
<a name="l00847"></a>00847                 <span class="keywordflow">if</span>($arg_name == '<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>') {
<a name="l00848"></a>00848                     $_assign_var = $arg_value;
<a name="l00849"></a>00849                     unset($attrs['<a class="code" href="classSmarty.html#63fc695d58eca87b622ba173849559a7">assign</a>']);
<a name="l00850"></a>00850                     <span class="keywordflow">continue</span>;
<a name="l00851"></a>00851                 }
<a name="l00852"></a>00852                 <span class="keywordflow">if</span> (is_bool($arg_value))
<a name="l00853"></a>00853                     $arg_value = $arg_value ? '<span class="keyword">true</span>' : '<span class="keyword">false</span>';
<a name="l00854"></a>00854                 $arg_list[] = <span class="stringliteral">"'$arg_name' =&gt; $arg_value"</span>;
<a name="l00855"></a>00855             }
<a name="l00856"></a>00856         }
<a name="l00857"></a>00857 
<a name="l00858"></a>00858         <span class="keywordflow">if</span>($this-&gt;_reg_objects[$object][2]) {
<a name="l00859"></a>00859             <span class="comment">// smarty object argument format</span>
<a name="l00860"></a>00860             $args = <span class="stringliteral">"array("</span>.implode(<span class="charliteral">','</span>, (array)$arg_list).<span class="stringliteral">"), \$this"</span>;
<a name="l00861"></a>00861         } <span class="keywordflow">else</span> {
<a name="l00862"></a>00862             <span class="comment">// traditional argument format</span>
<a name="l00863"></a>00863             $args = implode(<span class="charliteral">','</span>, array_values($attrs));
<a name="l00864"></a>00864             <span class="keywordflow">if</span> (empty($args)) {
<a name="l00865"></a>00865                 $args = 'null';
<a name="l00866"></a>00866             }
<a name="l00867"></a>00867         }
<a name="l00868"></a>00868 
<a name="l00869"></a>00869         $prefix = '';
<a name="l00870"></a>00870         $postfix = '';
<a name="l00871"></a>00871         $newline = '';
<a name="l00872"></a>00872         <span class="keywordflow">if</span>(!is_object($this-&gt;_reg_objects[$object][0])) {
<a name="l00873"></a>00873             $this-&gt;<a class="code" href="classSmarty.html#2af2bdd132f9c210183775c0bf1c22d9">_trigger_fatal_error</a>(<span class="stringliteral">"registered '$object' is not an object"</span> , $this-&gt;_current_file, $this-&gt;_current_line_no, __FILE__, __LINE__);
<a name="l00874"></a>00874         } elseif(!empty($this-&gt;_reg_objects[$object][1]) &amp;&amp; !in_array($obj_comp, $this-&gt;_reg_objects[$object][1])) {
<a name="l00875"></a>00875             $this-&gt;<a class="code" href="classSmarty.html#2af2bdd132f9c210183775c0bf1c22d9">_trigger_fatal_error</a>(<span class="stringliteral">"'$obj_comp' is not a registered component of object '$object'"</span>, $this-&gt;_current_file, $this-&gt;_current_line_no, __FILE__, __LINE__);
<a name="l00876"></a>00876         } elseif(method_exists($this-&gt;_reg_objects[$object][0], $obj_comp)) {
<a name="l00877"></a>00877             <span class="comment">// method</span>
<a name="l00878"></a>00878             <span class="keywordflow">if</span>(in_array($obj_comp, $this-&gt;_reg_objects[$object][3])) {
<a name="l00879"></a>00879                 <span class="comment">// block method</span>
<a name="l00880"></a>00880                 <span class="keywordflow">if</span> ($start_tag) {
<a name="l00881"></a>00881                     $prefix = <span class="stringliteral">"\$this-&gt;_tag_stack[] = array('$obj_comp', $args); "</span>;
<a name="l00882"></a>00882                     $prefix .= <span class="stringliteral">"\$_block_repeat=true; \$this-&gt;_reg_objects['$object'][0]-&gt;$obj_comp(\$this-&gt;_tag_stack[count(\$this-&gt;_tag_stack)-1][1], null, \$this, \$_block_repeat); "</span>;
<a name="l00883"></a>00883                     $prefix .= <span class="stringliteral">"while (\$_block_repeat) { ob_start();"</span>;
<a name="l00884"></a>00884                     $return = null;
<a name="l00885"></a>00885                     $postfix = '';
<a name="l00886"></a>00886                 } <span class="keywordflow">else</span> {
<a name="l00887"></a>00887                     $prefix = <span class="stringliteral">"\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;"</span>;
<a name="l00888"></a>00888                     $return = <span class="stringliteral">"\$this-&gt;_reg_objects['$object'][0]-&gt;$obj_comp(\$this-&gt;_tag_stack[count(\$this-&gt;_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"</span>;
<a name="l00889"></a>00889                     $postfix = <span class="stringliteral">"} array_pop(\$this-&gt;_tag_stack);"</span>;
<a name="l00890"></a>00890                 }
<a name="l00891"></a>00891             } <span class="keywordflow">else</span> {
<a name="l00892"></a>00892                 <span class="comment">// non-block method</span>
<a name="l00893"></a>00893                 $return = <span class="stringliteral">"\$this-&gt;_reg_objects['$object'][0]-&gt;$obj_comp($args)"</span>;
<a name="l00894"></a>00894             }
<a name="l00895"></a>00895         } <span class="keywordflow">else</span> {
<a name="l00896"></a>00896             <span class="comment">// property</span>
<a name="l00897"></a>00897             $return = <span class="stringliteral">"\$this-&gt;_reg_objects['$object'][0]-&gt;$obj_comp"</span>;
<a name="l00898"></a>00898         }
<a name="l00899"></a>00899 
<a name="l00900"></a>00900         <span class="keywordflow">if</span>($return != null) {
<a name="l00901"></a>00901             <span class="keywordflow">if</span>($tag_modifier != '') {
<a name="l00902"></a>00902                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($return, $tag_modifier);
<a name="l00903"></a>00903             }
<a name="l00904"></a>00904 
<a name="l00905"></a>00905             <span class="keywordflow">if</span>(!empty($_assign_var)) {
<a name="l00906"></a>00906                 $output = <span class="stringliteral">"\$this-&gt;assign('"</span> . $this-&gt;<a class="code" href="classSmarty.html#2563e0d1649fe1cd693b9f9ad4ef2f43">_dequote</a>($_assign_var) .<span class="stringliteral">"',  $return);"</span>;
<a name="l00907"></a>00907             } <span class="keywordflow">else</span> {
<a name="l00908"></a>00908                 $output = 'echo ' . $return . <span class="charliteral">';'</span>;
<a name="l00909"></a>00909                 $newline = $this-&gt;_additional_newline;
<a name="l00910"></a>00910             }
<a name="l00911"></a>00911         } <span class="keywordflow">else</span> {
<a name="l00912"></a>00912             $output = '';
<a name="l00913"></a>00913         }
<a name="l00914"></a>00914 
<a name="l00915"></a>00915         <span class="keywordflow">return</span> '&lt;?php ' . $prefix . $output . $postfix . <span class="stringliteral">"?&gt;"</span> . $newline;
<a name="l00916"></a>00916     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="d6c4e3a2309e3354a84fbf2992e78832"></a><!-- doxytag: member="Smarty_Compiler::_compile_section_start" ref="d6c4e3a2309e3354a84fbf2992e78832" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_section_start           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile {section . 
<p>
..} tag<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01043">1043</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01044"></a>01044     {
<a name="l01045"></a>01045         $attrs = $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args);
<a name="l01046"></a>01046         $arg_list = array();
<a name="l01047"></a>01047 
<a name="l01048"></a>01048         $output = '&lt;?php ';
<a name="l01049"></a>01049         $section_name = $attrs['name'];
<a name="l01050"></a>01050         <span class="keywordflow">if</span> (empty($section_name)) {
<a name="l01051"></a>01051             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"missing section name"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01052"></a>01052         }
<a name="l01053"></a>01053 
<a name="l01054"></a>01054         $output .= <span class="stringliteral">"unset(\$this-&gt;_sections[$section_name]);\n"</span>;
<a name="l01055"></a>01055         $section_props = <span class="stringliteral">"\$this-&gt;_sections[$section_name]"</span>;
<a name="l01056"></a>01056 
<a name="l01057"></a>01057         foreach ($attrs as $attr_name =&gt; $attr_value) {
<a name="l01058"></a>01058             <span class="keywordflow">switch</span> ($attr_name) {
<a name="l01059"></a>01059                 <span class="keywordflow">case</span> 'loop':
<a name="l01060"></a>01060                     $output .= <span class="stringliteral">"{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n"</span>;
<a name="l01061"></a>01061                     <span class="keywordflow">break</span>;
<a name="l01062"></a>01062 
<a name="l01063"></a>01063                 <span class="keywordflow">case</span> 'show':
<a name="l01064"></a>01064                     <span class="keywordflow">if</span> (is_bool($attr_value))
<a name="l01065"></a>01065                         $show_attr_value = $attr_value ? '<span class="keyword">true</span>' : '<span class="keyword">false</span>';
<a name="l01066"></a>01066                     <span class="keywordflow">else</span>
<a name="l01067"></a>01067                         $show_attr_value = <span class="stringliteral">"(bool)$attr_value"</span>;
<a name="l01068"></a>01068                     $output .= <span class="stringliteral">"{$section_props}['show'] = $show_attr_value;\n"</span>;
<a name="l01069"></a>01069                     <span class="keywordflow">break</span>;
<a name="l01070"></a>01070 
<a name="l01071"></a>01071                 <span class="keywordflow">case</span> 'name':
<a name="l01072"></a>01072                     $output .= <span class="stringliteral">"{$section_props}['$attr_name'] = $attr_value;\n"</span>;
<a name="l01073"></a>01073                     <span class="keywordflow">break</span>;
<a name="l01074"></a>01074 
<a name="l01075"></a>01075                 <span class="keywordflow">case</span> 'max':
<a name="l01076"></a>01076                 <span class="keywordflow">case</span> 'start':
<a name="l01077"></a>01077                     $output .= <span class="stringliteral">"{$section_props}['$attr_name'] = (int)$attr_value;\n"</span>;
<a name="l01078"></a>01078                     <span class="keywordflow">break</span>;
<a name="l01079"></a>01079 
<a name="l01080"></a>01080                 <span class="keywordflow">case</span> 'step':
<a name="l01081"></a>01081                     $output .= <span class="stringliteral">"{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n"</span>;
<a name="l01082"></a>01082                     <span class="keywordflow">break</span>;
<a name="l01083"></a>01083 
<a name="l01084"></a>01084                 <span class="keywordflow">default</span>:
<a name="l01085"></a>01085                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unknown section attribute - '$attr_name'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01086"></a>01086                     <span class="keywordflow">break</span>;
<a name="l01087"></a>01087             }
<a name="l01088"></a>01088         }
<a name="l01089"></a>01089 
<a name="l01090"></a>01090         <span class="keywordflow">if</span> (!isset($attrs['show']))
<a name="l01091"></a>01091             $output .= <span class="stringliteral">"{$section_props}['show'] = true;\n"</span>;
<a name="l01092"></a>01092 
<a name="l01093"></a>01093         <span class="keywordflow">if</span> (!isset($attrs['loop']))
<a name="l01094"></a>01094             $output .= <span class="stringliteral">"{$section_props}['loop'] = 1;\n"</span>;
<a name="l01095"></a>01095 
<a name="l01096"></a>01096         <span class="keywordflow">if</span> (!isset($attrs['max']))
<a name="l01097"></a>01097             $output .= <span class="stringliteral">"{$section_props}['max'] = {$section_props}['loop'];\n"</span>;
<a name="l01098"></a>01098         <span class="keywordflow">else</span>
<a name="l01099"></a>01099             $output .= <span class="stringliteral">"if ({$section_props}['max'] &lt; 0)\n"</span> .
<a name="l01100"></a>01100                        <span class="stringliteral">"    {$section_props}['max'] = {$section_props}['loop'];\n"</span>;
<a name="l01101"></a>01101 
<a name="l01102"></a>01102         <span class="keywordflow">if</span> (!isset($attrs['step']))
<a name="l01103"></a>01103             $output .= <span class="stringliteral">"{$section_props}['step'] = 1;\n"</span>;
<a name="l01104"></a>01104 
<a name="l01105"></a>01105         <span class="keywordflow">if</span> (!isset($attrs['start']))
<a name="l01106"></a>01106             $output .= <span class="stringliteral">"{$section_props}['start'] = {$section_props}['step'] &gt; 0 ? 0 : {$section_props}['loop']-1;\n"</span>;
<a name="l01107"></a>01107         <span class="keywordflow">else</span> {
<a name="l01108"></a>01108             $output .= <span class="stringliteral">"if ({$section_props}['start'] &lt; 0)\n"</span> .
<a name="l01109"></a>01109                        <span class="stringliteral">"    {$section_props}['start'] = max({$section_props}['step'] &gt; 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n"</span> .
<a name="l01110"></a>01110                        <span class="stringliteral">"else\n"</span> .
<a name="l01111"></a>01111                        <span class="stringliteral">"    {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] &gt; 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n"</span>;
<a name="l01112"></a>01112         }
<a name="l01113"></a>01113 
<a name="l01114"></a>01114         $output .= <span class="stringliteral">"if ({$section_props}['show']) {\n"</span>;
<a name="l01115"></a>01115         <span class="keywordflow">if</span> (!isset($attrs['start']) &amp;&amp; !isset($attrs['step']) &amp;&amp; !isset($attrs['max'])) {
<a name="l01116"></a>01116             $output .= <span class="stringliteral">"    {$section_props}['total'] = {$section_props}['loop'];\n"</span>;
<a name="l01117"></a>01117         } <span class="keywordflow">else</span> {
<a name="l01118"></a>01118             $output .= <span class="stringliteral">"    {$section_props}['total'] = min(ceil(({$section_props}['step'] &gt; 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n"</span>;
<a name="l01119"></a>01119         }
<a name="l01120"></a>01120         $output .= <span class="stringliteral">"    if ({$section_props}['total'] == 0)\n"</span> .
<a name="l01121"></a>01121                    <span class="stringliteral">"        {$section_props}['show'] = false;\n"</span> .
<a name="l01122"></a>01122                    <span class="stringliteral">"} else\n"</span> .
<a name="l01123"></a>01123                    <span class="stringliteral">"    {$section_props}['total'] = 0;\n"</span>;
<a name="l01124"></a>01124 
<a name="l01125"></a>01125         $output .= <span class="stringliteral">"if ({$section_props}['show']):\n"</span>;
<a name="l01126"></a>01126         $output .= <span class="stringliteral">"</span>
<a name="l01127"></a>01127 <span class="stringliteral">            for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;</span>
<a name="l01128"></a>01128 <span class="stringliteral">                 {$section_props}['iteration'] &lt;= {$section_props}['total'];</span>
<a name="l01129"></a>01129 <span class="stringliteral">                 {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n"</span>;
<a name="l01130"></a>01130         $output .= <span class="stringliteral">"{$section_props}['rownum'] = {$section_props}['iteration'];\n"</span>;
<a name="l01131"></a>01131         $output .= <span class="stringliteral">"{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n"</span>;
<a name="l01132"></a>01132         $output .= <span class="stringliteral">"{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n"</span>;
<a name="l01133"></a>01133         $output .= <span class="stringliteral">"{$section_props}['first']      = ({$section_props}['iteration'] == 1);\n"</span>;
<a name="l01134"></a>01134         $output .= <span class="stringliteral">"{$section_props}['last']       = ({$section_props}['iteration'] == {$section_props}['total']);\n"</span>;
<a name="l01135"></a>01135 
<a name="l01136"></a>01136         $output .= <span class="stringliteral">"?&gt;"</span>;
<a name="l01137"></a>01137 
<a name="l01138"></a>01138         <span class="keywordflow">return</span> $output;
<a name="l01139"></a>01139     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="dc652b9fb4277fd8d33d957608394751"></a><!-- doxytag: member="Smarty_Compiler::_compile_smarty_ref" ref="dc652b9fb4277fd8d33d957608394751" args="(&amp;$indexes)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_smarty_ref           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">&amp;$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>indexes</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compiles references of type $smarty.foo. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$indexes </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01981">1981</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01982"></a>01982     {
<a name="l01983"></a>01983         <span class="comment">/* Extract the reference name. */</span>
<a name="l01984"></a>01984         $_ref = substr($indexes[0], 1);
<a name="l01985"></a>01985         foreach($indexes as $_index_no=&gt;$_index) {
<a name="l01986"></a>01986             <span class="keywordflow">if</span> (substr($_index, 0, 1) != <span class="charliteral">'.'</span> &amp;&amp; $_index_no&lt;2 || !preg_match('~^(\.|\[|-&gt;)~', $_index)) {
<a name="l01987"></a>01987                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
<a name="l01988"></a>01988             }
<a name="l01989"></a>01989         }
<a name="l01990"></a>01990 
<a name="l01991"></a>01991         <span class="keywordflow">switch</span> ($_ref) {
<a name="l01992"></a>01992             <span class="keywordflow">case</span> 'now':
<a name="l01993"></a>01993                 $compiled_ref = 'time()';
<a name="l01994"></a>01994                 $_max_index = 1;
<a name="l01995"></a>01995                 <span class="keywordflow">break</span>;
<a name="l01996"></a>01996 
<a name="l01997"></a>01997             <span class="keywordflow">case</span> 'foreach':
<a name="l01998"></a>01998                 array_shift($indexes);
<a name="l01999"></a>01999                 $_var = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>(substr($indexes[0], 1));
<a name="l02000"></a>02000                 $_propname = substr($indexes[1], 1);
<a name="l02001"></a>02001                 $_max_index = 1;
<a name="l02002"></a>02002                 <span class="keywordflow">switch</span> ($_propname) {
<a name="l02003"></a>02003                     <span class="keywordflow">case</span> 'index':
<a name="l02004"></a>02004                         array_shift($indexes);
<a name="l02005"></a>02005                         $compiled_ref = <span class="stringliteral">"(\$this-&gt;_foreach[$_var]['iteration']-1)"</span>;
<a name="l02006"></a>02006                         <span class="keywordflow">break</span>;
<a name="l02007"></a>02007                         
<a name="l02008"></a>02008                     <span class="keywordflow">case</span> 'first':
<a name="l02009"></a>02009                         array_shift($indexes);
<a name="l02010"></a>02010                         $compiled_ref = <span class="stringliteral">"(\$this-&gt;_foreach[$_var]['iteration'] &lt;= 1)"</span>;
<a name="l02011"></a>02011                         <span class="keywordflow">break</span>;
<a name="l02012"></a>02012 
<a name="l02013"></a>02013                     <span class="keywordflow">case</span> 'last':
<a name="l02014"></a>02014                         array_shift($indexes);
<a name="l02015"></a>02015                         $compiled_ref = <span class="stringliteral">"(\$this-&gt;_foreach[$_var]['iteration'] == \$this-&gt;_foreach[$_var]['total'])"</span>;
<a name="l02016"></a>02016                         <span class="keywordflow">break</span>;
<a name="l02017"></a>02017                         
<a name="l02018"></a>02018                     <span class="keywordflow">case</span> 'show':
<a name="l02019"></a>02019                         array_shift($indexes);
<a name="l02020"></a>02020                         $compiled_ref = <span class="stringliteral">"(\$this-&gt;_foreach[$_var]['total'] &gt; 0)"</span>;
<a name="l02021"></a>02021                         <span class="keywordflow">break</span>;
<a name="l02022"></a>02022                         
<a name="l02023"></a>02023                     <span class="keywordflow">default</span>:
<a name="l02024"></a>02024                         unset($_max_index);
<a name="l02025"></a>02025                         $compiled_ref = <span class="stringliteral">"\$this-&gt;_foreach[$_var]"</span>;
<a name="l02026"></a>02026                 }
<a name="l02027"></a>02027                 <span class="keywordflow">break</span>;
<a name="l02028"></a>02028 
<a name="l02029"></a>02029             <span class="keywordflow">case</span> 'section':
<a name="l02030"></a>02030                 array_shift($indexes);
<a name="l02031"></a>02031                 $_var = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>(substr($indexes[0], 1));
<a name="l02032"></a>02032                 $compiled_ref = <span class="stringliteral">"\$this-&gt;_sections[$_var]"</span>;
<a name="l02033"></a>02033                 <span class="keywordflow">break</span>;
<a name="l02034"></a>02034 
<a name="l02035"></a>02035             <span class="keywordflow">case</span> 'get':
<a name="l02036"></a>02036                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_GET' : <span class="stringliteral">"\$GLOBALS['HTTP_GET_VARS']"</span>;
<a name="l02037"></a>02037                 <span class="keywordflow">break</span>;
<a name="l02038"></a>02038 
<a name="l02039"></a>02039             <span class="keywordflow">case</span> 'post':
<a name="l02040"></a>02040                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_POST' : <span class="stringliteral">"\$GLOBALS['HTTP_POST_VARS']"</span>;
<a name="l02041"></a>02041                 <span class="keywordflow">break</span>;
<a name="l02042"></a>02042 
<a name="l02043"></a>02043             <span class="keywordflow">case</span> 'cookies':
<a name="l02044"></a>02044                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_COOKIE' : <span class="stringliteral">"\$GLOBALS['HTTP_COOKIE_VARS']"</span>;
<a name="l02045"></a>02045                 <span class="keywordflow">break</span>;
<a name="l02046"></a>02046 
<a name="l02047"></a>02047             <span class="keywordflow">case</span> 'env':
<a name="l02048"></a>02048                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_ENV' : <span class="stringliteral">"\$GLOBALS['HTTP_ENV_VARS']"</span>;
<a name="l02049"></a>02049                 <span class="keywordflow">break</span>;
<a name="l02050"></a>02050 
<a name="l02051"></a>02051             <span class="keywordflow">case</span> 'server':
<a name="l02052"></a>02052                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_SERVER' : <span class="stringliteral">"\$GLOBALS['HTTP_SERVER_VARS']"</span>;
<a name="l02053"></a>02053                 <span class="keywordflow">break</span>;
<a name="l02054"></a>02054 
<a name="l02055"></a>02055             <span class="keywordflow">case</span> 'session':
<a name="l02056"></a>02056                 $compiled_ref = ($this-&gt;request_use_auto_globals) ? '$_SESSION' : <span class="stringliteral">"\$GLOBALS['HTTP_SESSION_VARS']"</span>;
<a name="l02057"></a>02057                 <span class="keywordflow">break</span>;
<a name="l02058"></a>02058 
<a name="l02059"></a>02059             <span class="comment">/*</span>
<a name="l02060"></a>02060 <span class="comment">             * These cases are handled either at run-time or elsewhere in the</span>
<a name="l02061"></a>02061 <span class="comment">             * compiler.</span>
<a name="l02062"></a>02062 <span class="comment">             */</span>
<a name="l02063"></a>02063             <span class="keywordflow">case</span> 'request':
<a name="l02064"></a>02064                 <span class="keywordflow">if</span> ($this-&gt;request_use_auto_globals) {
<a name="l02065"></a>02065                     $compiled_ref = '$_REQUEST';
<a name="l02066"></a>02066                     <span class="keywordflow">break</span>;
<a name="l02067"></a>02067                 } <span class="keywordflow">else</span> {
<a name="l02068"></a>02068                     $this-&gt;_init_smarty_vars = <span class="keyword">true</span>;
<a name="l02069"></a>02069                 }
<a name="l02070"></a>02070                 <span class="keywordflow">return</span> null;
<a name="l02071"></a>02071 
<a name="l02072"></a>02072             <span class="keywordflow">case</span> 'capture':
<a name="l02073"></a>02073                 <span class="keywordflow">return</span> null;
<a name="l02074"></a>02074 
<a name="l02075"></a>02075             <span class="keywordflow">case</span> '<span class="keyword">template</span>':
<a name="l02076"></a>02076                 $compiled_ref = <span class="stringliteral">"'$this-&gt;_current_file'"</span>;
<a name="l02077"></a>02077                 $_max_index = 1;
<a name="l02078"></a>02078                 <span class="keywordflow">break</span>;
<a name="l02079"></a>02079 
<a name="l02080"></a>02080             <span class="keywordflow">case</span> 'version':
<a name="l02081"></a>02081                 $compiled_ref = <span class="stringliteral">"'$this-&gt;_version'"</span>;
<a name="l02082"></a>02082                 $_max_index = 1;
<a name="l02083"></a>02083                 <span class="keywordflow">break</span>;
<a name="l02084"></a>02084 
<a name="l02085"></a>02085             <span class="keywordflow">case</span> '<span class="keyword">const</span>':
<a name="l02086"></a>02086                 <span class="keywordflow">if</span> ($this-&gt;security &amp;&amp; !$this-&gt;security_settings['ALLOW_CONSTANTS']) {
<a name="l02087"></a>02087                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"(secure mode) constants not permitted"</span>,
<a name="l02088"></a>02088                                          E_USER_WARNING, __FILE__, __LINE__);
<a name="l02089"></a>02089                     <span class="keywordflow">return</span>;
<a name="l02090"></a>02090                 }
<a name="l02091"></a>02091                 array_shift($indexes);
<a name="l02092"></a>02092                 <span class="keywordflow">if</span> (preg_match('!^\.\w+$!', $indexes[0])) {
<a name="l02093"></a>02093                     $compiled_ref = <span class="charliteral">'@'</span> . substr($indexes[0], 1);
<a name="l02094"></a>02094                 } <span class="keywordflow">else</span> {
<a name="l02095"></a>02095                     $_val = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>(substr($indexes[0], 1));
<a name="l02096"></a>02096                     $compiled_ref = '@constant(' . $_val . <span class="charliteral">')'</span>;
<a name="l02097"></a>02097                 }
<a name="l02098"></a>02098                 $_max_index = 1;
<a name="l02099"></a>02099                 <span class="keywordflow">break</span>;
<a name="l02100"></a>02100 
<a name="l02101"></a>02101             <span class="keywordflow">case</span> 'config':
<a name="l02102"></a>02102                 $compiled_ref = <span class="stringliteral">"\$this-&gt;_config[0]['vars']"</span>;
<a name="l02103"></a>02103                 $_max_index = 3;
<a name="l02104"></a>02104                 <span class="keywordflow">break</span>;
<a name="l02105"></a>02105 
<a name="l02106"></a>02106             <span class="keywordflow">case</span> 'ldelim':
<a name="l02107"></a>02107                 $compiled_ref = <span class="stringliteral">"'$this-&gt;left_delimiter'"</span>;
<a name="l02108"></a>02108                 <span class="keywordflow">break</span>;
<a name="l02109"></a>02109 
<a name="l02110"></a>02110             <span class="keywordflow">case</span> 'rdelim':
<a name="l02111"></a>02111                 $compiled_ref = <span class="stringliteral">"'$this-&gt;right_delimiter'"</span>;
<a name="l02112"></a>02112                 <span class="keywordflow">break</span>;
<a name="l02113"></a>02113                 
<a name="l02114"></a>02114             <span class="keywordflow">default</span>:
<a name="l02115"></a>02115                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('$smarty.' . $_ref . ' is an unknown reference', E_USER_ERROR, __FILE__, __LINE__);
<a name="l02116"></a>02116                 <span class="keywordflow">break</span>;
<a name="l02117"></a>02117         }
<a name="l02118"></a>02118 
<a name="l02119"></a>02119         <span class="keywordflow">if</span> (isset($_max_index) &amp;&amp; count($indexes) &gt; $_max_index) {
<a name="l02120"></a>02120             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('$smarty' . implode('', $indexes) .' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
<a name="l02121"></a>02121         }
<a name="l02122"></a>02122 
<a name="l02123"></a>02123         array_shift($indexes);
<a name="l02124"></a>02124         <span class="keywordflow">return</span> $compiled_ref;
<a name="l02125"></a>02125     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="2437ad0b38700c2b4b08573566c43c48"></a><!-- doxytag: member="Smarty_Compiler::_compile_tag" ref="2437ad0b38700c2b4b08573566c43c48" args="($template_tag)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_compile_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>template_tag</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compile a template tag. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$template_tag </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00428">428</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l00429"></a>00429     {
<a name="l00430"></a>00430         <span class="comment">/* Matched comment. */</span>
<a name="l00431"></a>00431         <span class="keywordflow">if</span> (substr($template_tag, 0, 1) == <span class="charliteral">'*'</span> &amp;&amp; substr($template_tag, -1) == <span class="charliteral">'*'</span>)
<a name="l00432"></a>00432             <span class="keywordflow">return</span> '';
<a name="l00433"></a>00433         
<a name="l00434"></a>00434         <span class="comment">/* Split tag into two three parts: command, command modifiers and the arguments. */</span>
<a name="l00435"></a>00435         <span class="keywordflow">if</span>(! preg_match('~^(?:(' . $this-&gt;_num_const_regexp . <span class="charliteral">'|'</span> . $this-&gt;_obj_call_regexp . <span class="charliteral">'|'</span> . $this-&gt;_var_regexp
<a name="l00436"></a>00436                 . '|\/?' . $this-&gt;_reg_obj_regexp . '|\/?' . $this-&gt;_func_regexp . ')(' . $this-&gt;_mod_regexp . '*))
<a name="l00437"></a>00437                       (?:\s+(.*))?$
<a name="l00438"></a>00438                     ~xs', $template_tag, $match)) {
<a name="l00439"></a>00439             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unrecognized tag: $template_tag"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l00440"></a>00440         }
<a name="l00441"></a>00441         
<a name="l00442"></a>00442         $tag_command = $match[1];
<a name="l00443"></a>00443         $tag_modifier = isset($match[2]) ? $match[2] : null;
<a name="l00444"></a>00444         $tag_args = isset($match[3]) ? $match[3] : null;
<a name="l00445"></a>00445 
<a name="l00446"></a>00446         <span class="keywordflow">if</span> (preg_match('~^' . $this-&gt;_num_const_regexp . <span class="charliteral">'|'</span> . $this-&gt;_obj_call_regexp . <span class="charliteral">'|'</span> . $this-&gt;_var_regexp . '$~', $tag_command)) {
<a name="l00447"></a>00447             <span class="comment">/* tag name is a variable or object */</span>
<a name="l00448"></a>00448             $_return = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($tag_command . $tag_modifier);
<a name="l00449"></a>00449             <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php echo $_return; ?&gt;"</span> . $this-&gt;_additional_newline;
<a name="l00450"></a>00450         }
<a name="l00451"></a>00451 
<a name="l00452"></a>00452         <span class="comment">/* If the tag name is a registered object, we process it. */</span>
<a name="l00453"></a>00453         <span class="keywordflow">if</span> (preg_match('~^\/?' . $this-&gt;_reg_obj_regexp . '$~', $tag_command)) {
<a name="l00454"></a>00454             <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#4768af997ac7a6ca06b6f426b9bd39cf">_compile_registered_object_tag</a>($tag_command, $this-&gt;<a class="code" href="classSmarty__Compiler.html#5706e11e1bec434a07ced48e1462507c">_parse_attrs</a>($tag_args), $tag_modifier);
<a name="l00455"></a>00455         }
<a name="l00456"></a>00456 
<a name="l00457"></a>00457         <span class="keywordflow">switch</span> ($tag_command) {
<a name="l00458"></a>00458             <span class="keywordflow">case</span> 'include':
<a name="l00459"></a>00459                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#78d8b41387b488cf352e4a638023e5ed">_compile_include_tag</a>($tag_args);
<a name="l00460"></a>00460 
<a name="l00461"></a>00461             <span class="keywordflow">case</span> 'include_php':
<a name="l00462"></a>00462                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#120c8620070c5417709f16896958c7bc">_compile_include_php_tag</a>($tag_args);
<a name="l00463"></a>00463 
<a name="l00464"></a>00464             <span class="keywordflow">case</span> '<span class="keywordflow">if</span>':
<a name="l00465"></a>00465                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('<span class="keywordflow">if</span>');
<a name="l00466"></a>00466                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#58d511ec4be2cdd98a9cd9576816fa21">_compile_if_tag</a>($tag_args);
<a name="l00467"></a>00467 
<a name="l00468"></a>00468             <span class="keywordflow">case</span> '<span class="keywordflow">else</span>':
<a name="l00469"></a>00469                 list($_open_tag) = end($this-&gt;_tag_stack);
<a name="l00470"></a>00470                 <span class="keywordflow">if</span> ($_open_tag != '<span class="keywordflow">if</span>' &amp;&amp; $_open_tag != 'elseif')
<a name="l00471"></a>00471                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('unexpected {<span class="keywordflow">else</span>}', E_USER_ERROR, __FILE__, __LINE__);
<a name="l00472"></a>00472                 <span class="keywordflow">else</span>
<a name="l00473"></a>00473                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('<span class="keywordflow">else</span>');
<a name="l00474"></a>00474                 <span class="keywordflow">return</span> '&lt;?php <span class="keywordflow">else</span>: ?&gt;';
<a name="l00475"></a>00475 
<a name="l00476"></a>00476             <span class="keywordflow">case</span> 'elseif':
<a name="l00477"></a>00477                 list($_open_tag) = end($this-&gt;_tag_stack);
<a name="l00478"></a>00478                 <span class="keywordflow">if</span> ($_open_tag != '<span class="keywordflow">if</span>' &amp;&amp; $_open_tag != 'elseif')
<a name="l00479"></a>00479                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('unexpected {elseif}', E_USER_ERROR, __FILE__, __LINE__);
<a name="l00480"></a>00480                 <span class="keywordflow">if</span> ($_open_tag == '<span class="keywordflow">if</span>')
<a name="l00481"></a>00481                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('elseif');
<a name="l00482"></a>00482                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#58d511ec4be2cdd98a9cd9576816fa21">_compile_if_tag</a>($tag_args, <span class="keyword">true</span>);
<a name="l00483"></a>00483 
<a name="l00484"></a>00484             <span class="keywordflow">case</span> '/<span class="keywordflow">if</span>':
<a name="l00485"></a>00485                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>('<span class="keywordflow">if</span>');
<a name="l00486"></a>00486                 <span class="keywordflow">return</span> '&lt;?php endif; ?&gt;';
<a name="l00487"></a>00487 
<a name="l00488"></a>00488             <span class="keywordflow">case</span> 'capture':
<a name="l00489"></a>00489                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#ce67ad4487e8492defe7d720712ddc01">_compile_capture_tag</a>(<span class="keyword">true</span>, $tag_args);
<a name="l00490"></a>00490 
<a name="l00491"></a>00491             <span class="keywordflow">case</span> '/capture':
<a name="l00492"></a>00492                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#ce67ad4487e8492defe7d720712ddc01">_compile_capture_tag</a>(<span class="keyword">false</span>);
<a name="l00493"></a>00493 
<a name="l00494"></a>00494             <span class="keywordflow">case</span> 'ldelim':
<a name="l00495"></a>00495                 <span class="keywordflow">return</span> $this-&gt;left_delimiter;
<a name="l00496"></a>00496 
<a name="l00497"></a>00497             <span class="keywordflow">case</span> 'rdelim':
<a name="l00498"></a>00498                 <span class="keywordflow">return</span> $this-&gt;right_delimiter;
<a name="l00499"></a>00499 
<a name="l00500"></a>00500             <span class="keywordflow">case</span> 'section':
<a name="l00501"></a>00501                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('section');
<a name="l00502"></a>00502                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#d6c4e3a2309e3354a84fbf2992e78832">_compile_section_start</a>($tag_args);
<a name="l00503"></a>00503 
<a name="l00504"></a>00504             <span class="keywordflow">case</span> 'sectionelse':
<a name="l00505"></a>00505                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('sectionelse');
<a name="l00506"></a>00506                 <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endfor; else: ?&gt;"</span>;
<a name="l00507"></a>00507                 <span class="keywordflow">break</span>;
<a name="l00508"></a>00508 
<a name="l00509"></a>00509             <span class="keywordflow">case</span> '/section':
<a name="l00510"></a>00510                 $_open_tag = $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>('section');
<a name="l00511"></a>00511                 <span class="keywordflow">if</span> ($_open_tag == 'sectionelse')
<a name="l00512"></a>00512                     <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endif; ?&gt;"</span>;
<a name="l00513"></a>00513                 <span class="keywordflow">else</span>
<a name="l00514"></a>00514                     <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endfor; endif; ?&gt;"</span>;
<a name="l00515"></a>00515 
<a name="l00516"></a>00516             <span class="keywordflow">case</span> 'foreach':
<a name="l00517"></a>00517                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('foreach');
<a name="l00518"></a>00518                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#f4169d507c719a53677048d51f61090d">_compile_foreach_start</a>($tag_args);
<a name="l00519"></a>00519                 <span class="keywordflow">break</span>;
<a name="l00520"></a>00520 
<a name="l00521"></a>00521             <span class="keywordflow">case</span> 'foreachelse':
<a name="l00522"></a>00522                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('foreachelse');
<a name="l00523"></a>00523                 <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endforeach; else: ?&gt;"</span>;
<a name="l00524"></a>00524 
<a name="l00525"></a>00525             <span class="keywordflow">case</span> '/foreach':
<a name="l00526"></a>00526                 $_open_tag = $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>('foreach');
<a name="l00527"></a>00527                 <span class="keywordflow">if</span> ($_open_tag == 'foreachelse')
<a name="l00528"></a>00528                     <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endif; unset(\$_from); ?&gt;"</span>;
<a name="l00529"></a>00529                 <span class="keywordflow">else</span>
<a name="l00530"></a>00530                     <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php endforeach; endif; unset(\$_from); ?&gt;"</span>;
<a name="l00531"></a>00531                 <span class="keywordflow">break</span>;
<a name="l00532"></a>00532 
<a name="l00533"></a>00533             <span class="keywordflow">case</span> 'strip':
<a name="l00534"></a>00534             <span class="keywordflow">case</span> '/strip':
<a name="l00535"></a>00535                 <span class="keywordflow">if</span> (substr($tag_command, 0, 1)==<span class="charliteral">'/'</span>) {
<a name="l00536"></a>00536                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>('strip');
<a name="l00537"></a>00537                     <span class="keywordflow">if</span> (--$this-&gt;_strip_depth==0) { <span class="comment">/* outermost closing {/strip} */</span>
<a name="l00538"></a>00538                         $this-&gt;_additional_newline = <span class="stringliteral">"\n"</span>;
<a name="l00539"></a>00539                         <span class="keywordflow">return</span> <span class="charliteral">'{'</span> . $tag_command . <span class="charliteral">'}'</span>;
<a name="l00540"></a>00540                     }
<a name="l00541"></a>00541                 } <span class="keywordflow">else</span> {
<a name="l00542"></a>00542                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#553d4bd92f21bc3714bf1cadeb61a9d7">_push_tag</a>('strip');
<a name="l00543"></a>00543                     <span class="keywordflow">if</span> ($this-&gt;_strip_depth++==0) { <span class="comment">/* outermost opening {strip} */</span>
<a name="l00544"></a>00544                         $this-&gt;_additional_newline = <span class="stringliteral">""</span>;
<a name="l00545"></a>00545                         <span class="keywordflow">return</span> <span class="charliteral">'{'</span> . $tag_command . <span class="charliteral">'}'</span>;
<a name="l00546"></a>00546                     }
<a name="l00547"></a>00547                 }
<a name="l00548"></a>00548                 <span class="keywordflow">return</span> '';
<a name="l00549"></a>00549 
<a name="l00550"></a>00550             <span class="keywordflow">case</span> 'php':
<a name="l00551"></a>00551                 <span class="comment">/* handle folded tags replaced by {php} */</span>
<a name="l00552"></a>00552                 list(, $block) = each($this-&gt;_folded_blocks);
<a name="l00553"></a>00553                 $this-&gt;_current_line_no += substr_count($block[0], <span class="stringliteral">"\n"</span>);
<a name="l00554"></a>00554                 <span class="comment">/* the number of matched elements in the regexp in _compile_file()</span>
<a name="l00555"></a>00555 <span class="comment">                   determins the type of folded tag that was found */</span>
<a name="l00556"></a>00556                 <span class="keywordflow">switch</span> (count($block)) {
<a name="l00557"></a>00557                     <span class="keywordflow">case</span> 2: <span class="comment">/* comment */</span>
<a name="l00558"></a>00558                         <span class="keywordflow">return</span> '';
<a name="l00559"></a>00559 
<a name="l00560"></a>00560                     <span class="keywordflow">case</span> 3: <span class="comment">/* literal */</span>
<a name="l00561"></a>00561                         <span class="keywordflow">return</span> <span class="stringliteral">"&lt;?php echo '"</span> . strtr($block[2], array(<span class="stringliteral">"'"</span>=&gt;<span class="stringliteral">"\'"</span>, <span class="stringliteral">"\\"</span>=&gt;<span class="stringliteral">"\\\\"</span>)) . <span class="stringliteral">"'; ?&gt;"</span> . $this-&gt;_additional_newline;
<a name="l00562"></a>00562 
<a name="l00563"></a>00563                     <span class="keywordflow">case</span> 4: <span class="comment">/* php */</span>
<a name="l00564"></a>00564                         <span class="keywordflow">if</span> ($this-&gt;security &amp;&amp; !$this-&gt;security_settings['PHP_TAGS']) {
<a name="l00565"></a>00565                             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"(secure mode) php tags not permitted"</span>, E_USER_WARNING, __FILE__, __LINE__);
<a name="l00566"></a>00566                             <span class="keywordflow">return</span>;
<a name="l00567"></a>00567                         }
<a name="l00568"></a>00568                         <span class="keywordflow">return</span> '&lt;?php ' . $block[3] .' ?&gt;';
<a name="l00569"></a>00569                 }
<a name="l00570"></a>00570                 <span class="keywordflow">break</span>;
<a name="l00571"></a>00571 
<a name="l00572"></a>00572             <span class="keywordflow">case</span> 'insert':
<a name="l00573"></a>00573                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#4a9b22720c848862c5719a116246955d">_compile_insert_tag</a>($tag_args);
<a name="l00574"></a>00574 
<a name="l00575"></a>00575             <span class="keywordflow">default</span>:
<a name="l00576"></a>00576                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="classSmarty__Compiler.html#ad3738a1a92e9a579dd3ab14469386b9">_compile_compiler_tag</a>($tag_command, $tag_args, $output)) {
<a name="l00577"></a>00577                     <span class="keywordflow">return</span> $output;
<a name="l00578"></a>00578                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="classSmarty__Compiler.html#de3e40923ed1ea61b8578831c2767a76">_compile_block_tag</a>($tag_command, $tag_args, $tag_modifier, $output)) {
<a name="l00579"></a>00579                     <span class="keywordflow">return</span> $output;
<a name="l00580"></a>00580                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="classSmarty__Compiler.html#4733e870ed01da5e62d52dde61cf2dec">_compile_custom_tag</a>($tag_command, $tag_args, $tag_modifier, $output)) {
<a name="l00581"></a>00581                     <span class="keywordflow">return</span> $output;                    
<a name="l00582"></a>00582                 } <span class="keywordflow">else</span> {
<a name="l00583"></a>00583                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unrecognized tag '$tag_command'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l00584"></a>00584                 }
<a name="l00585"></a>00585 
<a name="l00586"></a>00586         }
<a name="l00587"></a>00587     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ba11f398aa3e57fbf119bb1d718e854c"></a><!-- doxytag: member="Smarty_Compiler::_expand_quoted_text" ref="ba11f398aa3e57fbf119bb1d718e854c" args="($var_expr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_expand_quoted_text           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>var_expr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
expand quoted text with embedded variables 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$var_expr </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01669">1669</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01670"></a>01670     {
<a name="l01671"></a>01671         <span class="comment">// if contains unescaped $, expand it</span>
<a name="l01672"></a>01672         <span class="keywordflow">if</span>(preg_match_all('~(?:\`(?&lt;!\\\\)\$' . $this-&gt;_dvar_guts_regexp . '(?:' . $this-&gt;_obj_ext_regexp . ')*\`)|(?:(?&lt;!\\\\)\$\w+(\[[a-zA-Z0-9]+\])*)~', $var_expr, $_match)) {
<a name="l01673"></a>01673             $_match = $_match[0];
<a name="l01674"></a>01674             rsort($_match);
<a name="l01675"></a>01675             reset($_match);
<a name="l01676"></a>01676             foreach($_match as $_var) {
<a name="l01677"></a>01677                 $var_expr = str_replace ($_var, '<span class="stringliteral">".(' . $this-&gt;_parse_var(str_replace('`','',$_var)) . ')."</span>', $var_expr);
<a name="l01678"></a>01678             }
<a name="l01679"></a>01679             $_return = preg_replace('~\.<span class="stringliteral">""</span>|(?&lt;!\\\\)<span class="stringliteral">""</span>\.~', '', $var_expr);
<a name="l01680"></a>01680         } <span class="keywordflow">else</span> {
<a name="l01681"></a>01681             $_return = $var_expr;
<a name="l01682"></a>01682         }
<a name="l01683"></a>01683         <span class="comment">// replace double quoted literal string with single quotes</span>
<a name="l01684"></a>01684         $_return = preg_replace('~^<span class="stringliteral">"([\s\w]+)"</span>$~',<span class="stringliteral">"'\\1'"</span>,$_return);
<a name="l01685"></a>01685         <span class="keywordflow">return</span> $_return;
<a name="l01686"></a>01686     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="5706e11e1bec434a07ced48e1462507c"></a><!-- doxytag: member="Smarty_Compiler::_parse_attrs" ref="5706e11e1bec434a07ced48e1462507c" args="($tag_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_attrs           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tag_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Parse attribute string. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>array </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01510">1510</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01511"></a>01511     {
<a name="l01512"></a>01512 
<a name="l01513"></a>01513         <span class="comment">/* Tokenize tag attributes. */</span>
<a name="l01514"></a>01514         preg_match_all('~(?:' . $this-&gt;_obj_call_regexp . <span class="charliteral">'|'</span> . $this-&gt;_qstr_regexp . ' | (?&gt;[^<span class="stringliteral">"\'=\s]+)</span>
<a name="l01515"></a>01515 <span class="stringliteral">                         )+ |</span>
<a name="l01516"></a>01516 <span class="stringliteral">                         [=]</span>
<a name="l01517"></a>01517 <span class="stringliteral">                        ~x', $tag_args, $match);</span>
<a name="l01518"></a>01518 <span class="stringliteral">        $tokens       = $match[0];</span>
<a name="l01519"></a>01519 <span class="stringliteral"></span>
<a name="l01520"></a>01520 <span class="stringliteral">        $attrs = array();</span>
<a name="l01521"></a>01521 <span class="stringliteral">        /* Parse state:</span>
<a name="l01522"></a>01522 <span class="stringliteral">            0 - expecting attribute name</span>
<a name="l01523"></a>01523 <span class="stringliteral">            1 - expecting '='</span>
<a name="l01524"></a>01524 <span class="stringliteral">            2 - expecting attribute value (not '=') */</span>
<a name="l01525"></a>01525 <span class="stringliteral">        $state = 0;</span>
<a name="l01526"></a>01526 <span class="stringliteral"></span>
<a name="l01527"></a>01527 <span class="stringliteral">        foreach ($tokens as $token) {</span>
<a name="l01528"></a>01528 <span class="stringliteral">            switch ($state) {</span>
<a name="l01529"></a>01529 <span class="stringliteral">                case 0:</span>
<a name="l01530"></a>01530 <span class="stringliteral">                    /* If the token is a valid identifier, we set attribute name</span>
<a name="l01531"></a>01531 <span class="stringliteral">                       and go to state 1. */</span>
<a name="l01532"></a>01532 <span class="stringliteral">                    if (preg_match('~^\w+$~', $token)) {</span>
<a name="l01533"></a>01533 <span class="stringliteral">                        $attr_name = $token;</span>
<a name="l01534"></a>01534 <span class="stringliteral">                        $state = 1;</span>
<a name="l01535"></a>01535 <span class="stringliteral">                    } else</span>
<a name="l01536"></a>01536 <span class="stringliteral">                        $this-&gt;_syntax_error("</span>invalid attribute name: '$token'<span class="stringliteral">", E_USER_ERROR, __FILE__, __LINE__);</span>
<a name="l01537"></a>01537 <span class="stringliteral">                    break;</span>
<a name="l01538"></a>01538 <span class="stringliteral"></span>
<a name="l01539"></a>01539 <span class="stringliteral">                case 1:</span>
<a name="l01540"></a>01540 <span class="stringliteral">                    /* If the token is '=', then we go to state 2. */</span>
<a name="l01541"></a>01541 <span class="stringliteral">                    if ($token == '=') {</span>
<a name="l01542"></a>01542 <span class="stringliteral">                        $state = 2;</span>
<a name="l01543"></a>01543 <span class="stringliteral">                    } else</span>
<a name="l01544"></a>01544 <span class="stringliteral">                        $this-&gt;_syntax_error("</span>expecting <span class="charliteral">'='</span> after attribute name '$last_token'<span class="stringliteral">", E_USER_ERROR, __FILE__, __LINE__);</span>
<a name="l01545"></a>01545 <span class="stringliteral">                    break;</span>
<a name="l01546"></a>01546 <span class="stringliteral"></span>
<a name="l01547"></a>01547 <span class="stringliteral">                case 2:</span>
<a name="l01548"></a>01548 <span class="stringliteral">                    /* If token is not '=', we set the attribute value and go to</span>
<a name="l01549"></a>01549 <span class="stringliteral">                       state 0. */</span>
<a name="l01550"></a>01550 <span class="stringliteral">                    if ($token != '=') {</span>
<a name="l01551"></a>01551 <span class="stringliteral">                        /* We booleanize the token if it's a non-quoted possible</span>
<a name="l01552"></a>01552 <span class="stringliteral">                           boolean value. */</span>
<a name="l01553"></a>01553 <span class="stringliteral">                        if (preg_match('~^(on|yes|true)$~', $token)) {</span>
<a name="l01554"></a>01554 <span class="stringliteral">                            $token = 'true';</span>
<a name="l01555"></a>01555 <span class="stringliteral">                        } else if (preg_match('~^(off|no|false)$~', $token)) {</span>
<a name="l01556"></a>01556 <span class="stringliteral">                            $token = 'false';</span>
<a name="l01557"></a>01557 <span class="stringliteral">                        } else if ($token == 'null') {</span>
<a name="l01558"></a>01558 <span class="stringliteral">                            $token = 'null';</span>
<a name="l01559"></a>01559 <span class="stringliteral">                        } else if (preg_match('~^' . $this-&gt;_num_const_regexp . '|0[xX][0-9a-fA-F]+$~', $token)) {</span>
<a name="l01560"></a>01560 <span class="stringliteral">                            /* treat integer literally */</span>
<a name="l01561"></a>01561 <span class="stringliteral">                        } else if (!preg_match('~^' . $this-&gt;_obj_call_regexp . '|' . $this-&gt;_var_regexp . '(?:' . $this-&gt;_mod_regexp . ')*$~', $token)) {</span>
<a name="l01562"></a>01562 <span class="stringliteral">                            /* treat as a string, double-quote it escaping quotes */</span>
<a name="l01563"></a>01563 <span class="stringliteral">                            $token = '"</span>'.addslashes($token).<span class="charliteral">'"'</span>;
<a name="l01564"></a>01564                         }
<a name="l01565"></a>01565 
<a name="l01566"></a>01566                         $attrs[$attr_name] = $token;
<a name="l01567"></a>01567                         $state = 0;
<a name="l01568"></a>01568                     } <span class="keywordflow">else</span>
<a name="l01569"></a>01569                         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"'=' cannot be an attribute value"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01570"></a>01570                     <span class="keywordflow">break</span>;
<a name="l01571"></a>01571             }
<a name="l01572"></a>01572             $last_token = $token;
<a name="l01573"></a>01573         }
<a name="l01574"></a>01574 
<a name="l01575"></a>01575         <span class="keywordflow">if</span>($state != 0) {
<a name="l01576"></a>01576             <span class="keywordflow">if</span>($state == 1) {
<a name="l01577"></a>01577                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"expecting '=' after attribute name '$last_token'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01578"></a>01578             } <span class="keywordflow">else</span> {
<a name="l01579"></a>01579                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"missing attribute value"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01580"></a>01580             }
<a name="l01581"></a>01581         }
<a name="l01582"></a>01582 
<a name="l01583"></a>01583         $this-&gt;<a class="code" href="classSmarty__Compiler.html#0e01da79d898117be860ab893d15b477">_parse_vars_props</a>($attrs);
<a name="l01584"></a>01584 
<a name="l01585"></a>01585         <span class="keywordflow">return</span> $attrs;
<a name="l01586"></a>01586     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="5b6479977bec73b8ae0732c2b4f47d16"></a><!-- doxytag: member="Smarty_Compiler::_parse_conf_var" ref="5b6479977bec73b8ae0732c2b4f47d16" args="($conf_var_expr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_conf_var           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>conf_var_expr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
parse configuration variable expression into PHP code 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$conf_var_expr </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01847">1847</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01848"></a>01848     {
<a name="l01849"></a>01849         $parts = explode(<span class="charliteral">'|'</span>, $conf_var_expr, 2);
<a name="l01850"></a>01850         $var_ref = $parts[0];
<a name="l01851"></a>01851         $modifiers = isset($parts[1]) ? $parts[1] : '';
<a name="l01852"></a>01852 
<a name="l01853"></a>01853         $var_name = substr($var_ref, 1, -1);
<a name="l01854"></a>01854 
<a name="l01855"></a>01855         $output = <span class="stringliteral">"\$this-&gt;_config[0]['vars']['$var_name']"</span>;
<a name="l01856"></a>01856 
<a name="l01857"></a>01857         $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($output, $modifiers);
<a name="l01858"></a>01858 
<a name="l01859"></a>01859         <span class="keywordflow">return</span> $output;
<a name="l01860"></a>01860     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="af4aec862e7a94d4217382dceae72b50"></a><!-- doxytag: member="Smarty_Compiler::_parse_is_expr" ref="af4aec862e7a94d4217382dceae72b50" args="($is_arg, $tokens)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_is_expr           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>is_arg</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>tokens</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Parse is expression. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$is_arg </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$tokens </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>array </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01449">1449</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01450"></a>01450     {
<a name="l01451"></a>01451         $expr_end = 0;
<a name="l01452"></a>01452         $negate_expr = <span class="keyword">false</span>;
<a name="l01453"></a>01453 
<a name="l01454"></a>01454         <span class="keywordflow">if</span> (($first_token = array_shift($tokens)) == 'not') {
<a name="l01455"></a>01455             $negate_expr = <span class="keyword">true</span>;
<a name="l01456"></a>01456             $expr_type = array_shift($tokens);
<a name="l01457"></a>01457         } <span class="keywordflow">else</span>
<a name="l01458"></a>01458             $expr_type = $first_token;
<a name="l01459"></a>01459 
<a name="l01460"></a>01460         <span class="keywordflow">switch</span> ($expr_type) {
<a name="l01461"></a>01461             <span class="keywordflow">case</span> 'even':
<a name="l01462"></a>01462                 <span class="keywordflow">if</span> (isset($tokens[$expr_end]) &amp;&amp; $tokens[$expr_end] == 'by') {
<a name="l01463"></a>01463                     $expr_end++;
<a name="l01464"></a>01464                     $expr_arg = $tokens[$expr_end++];
<a name="l01465"></a>01465                     $expr = <span class="stringliteral">"!(1 &amp; ($is_arg / "</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($expr_arg) . <span class="stringliteral">"))"</span>;
<a name="l01466"></a>01466                 } <span class="keywordflow">else</span>
<a name="l01467"></a>01467                     $expr = <span class="stringliteral">"!(1 &amp; $is_arg)"</span>;
<a name="l01468"></a>01468                 <span class="keywordflow">break</span>;
<a name="l01469"></a>01469 
<a name="l01470"></a>01470             <span class="keywordflow">case</span> 'odd':
<a name="l01471"></a>01471                 <span class="keywordflow">if</span> (isset($tokens[$expr_end]) &amp;&amp; $tokens[$expr_end] == 'by') {
<a name="l01472"></a>01472                     $expr_end++;
<a name="l01473"></a>01473                     $expr_arg = $tokens[$expr_end++];
<a name="l01474"></a>01474                     $expr = <span class="stringliteral">"(1 &amp; ($is_arg / "</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($expr_arg) . <span class="stringliteral">"))"</span>;
<a name="l01475"></a>01475                 } <span class="keywordflow">else</span>
<a name="l01476"></a>01476                     $expr = <span class="stringliteral">"(1 &amp; $is_arg)"</span>;
<a name="l01477"></a>01477                 <span class="keywordflow">break</span>;
<a name="l01478"></a>01478 
<a name="l01479"></a>01479             <span class="keywordflow">case</span> 'div':
<a name="l01480"></a>01480                 <span class="keywordflow">if</span> (@$tokens[$expr_end] == 'by') {
<a name="l01481"></a>01481                     $expr_end++;
<a name="l01482"></a>01482                     $expr_arg = $tokens[$expr_end++];
<a name="l01483"></a>01483                     $expr = <span class="stringliteral">"!($is_arg % "</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($expr_arg) . <span class="stringliteral">")"</span>;
<a name="l01484"></a>01484                 } <span class="keywordflow">else</span> {
<a name="l01485"></a>01485                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"expecting 'by' after 'div'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01486"></a>01486                 }
<a name="l01487"></a>01487                 <span class="keywordflow">break</span>;
<a name="l01488"></a>01488 
<a name="l01489"></a>01489             <span class="keywordflow">default</span>:
<a name="l01490"></a>01490                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"unknown 'is' expression - '$expr_type'"</span>, E_USER_ERROR, __FILE__, __LINE__);
<a name="l01491"></a>01491                 <span class="keywordflow">break</span>;
<a name="l01492"></a>01492         }
<a name="l01493"></a>01493 
<a name="l01494"></a>01494         <span class="keywordflow">if</span> ($negate_expr) {
<a name="l01495"></a>01495             $expr = <span class="stringliteral">"!($expr)"</span>;
<a name="l01496"></a>01496         }
<a name="l01497"></a>01497 
<a name="l01498"></a>01498         array_splice($tokens, 0, $expr_end, $expr);
<a name="l01499"></a>01499 
<a name="l01500"></a>01500         <span class="keywordflow">return</span> $tokens;
<a name="l01501"></a>01501     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="5f39bfb73d59e9ec871c9c558c3c5d86"></a><!-- doxytag: member="Smarty_Compiler::_parse_modifiers" ref="5f39bfb73d59e9ec871c9c558c3c5d86" args="(&amp;$output, $modifier_string)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_modifiers           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">&amp;$&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>modifier_string</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
parse modifier chain into PHP code 
<p>
sets $output to parsed modified chain <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$output </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$modifier_string </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01893">1893</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01894"></a>01894     {
<a name="l01895"></a>01895         preg_match_all('~\|(@?\w+)((?&gt;:(?:'. $this-&gt;_qstr_regexp . '|[^|]+))*)~', <span class="charliteral">'|'</span> . $modifier_string, $_match);
<a name="l01896"></a>01896         list(, $_modifiers, $modifier_arg_strings) = $_match;
<a name="l01897"></a>01897 
<a name="l01898"></a>01898         <span class="keywordflow">for</span> ($_i = 0, $_for_max = count($_modifiers); $_i &lt; $_for_max; $_i++) {
<a name="l01899"></a>01899             $_modifier_name = $_modifiers[$_i];
<a name="l01900"></a>01900 
<a name="l01901"></a>01901             <span class="keywordflow">if</span>($_modifier_name == 'smarty') {
<a name="l01902"></a>01902                 <span class="comment">// skip smarty modifier</span>
<a name="l01903"></a>01903                 <span class="keywordflow">continue</span>;
<a name="l01904"></a>01904             }
<a name="l01905"></a>01905 
<a name="l01906"></a>01906             preg_match_all('~:(' . $this-&gt;_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match);
<a name="l01907"></a>01907             $_modifier_args = $_match[1];
<a name="l01908"></a>01908 
<a name="l01909"></a>01909             <span class="keywordflow">if</span> (substr($_modifier_name, 0, 1) == <span class="charliteral">'@'</span>) {
<a name="l01910"></a>01910                 $_map_array = <span class="keyword">false</span>;
<a name="l01911"></a>01911                 $_modifier_name = substr($_modifier_name, 1);
<a name="l01912"></a>01912             } <span class="keywordflow">else</span> {
<a name="l01913"></a>01913                 $_map_array = <span class="keyword">true</span>;
<a name="l01914"></a>01914             }
<a name="l01915"></a>01915 
<a name="l01916"></a>01916             <span class="keywordflow">if</span> (empty($this-&gt;_plugins['modifier'][$_modifier_name])
<a name="l01917"></a>01917                 &amp;&amp; !$this-&gt;<a class="code" href="classSmarty.html#5e3e1de75662305f3e2b08f536ed1918">_get_plugin_filepath</a>('modifier', $_modifier_name)
<a name="l01918"></a>01918                 &amp;&amp; function_exists($_modifier_name)) {
<a name="l01919"></a>01919                 <span class="keywordflow">if</span> ($this-&gt;security &amp;&amp; !in_array($_modifier_name, $this-&gt;security_settings['MODIFIER_FUNCS'])) {
<a name="l01920"></a>01920                     $this-&gt;<a class="code" href="classSmarty.html#2af2bdd132f9c210183775c0bf1c22d9">_trigger_fatal_error</a>(<span class="stringliteral">"[plugin] (secure mode) modifier '$_modifier_name' is not allowed"</span> , $this-&gt;_current_file, $this-&gt;_current_line_no, __FILE__, __LINE__);
<a name="l01921"></a>01921                 } <span class="keywordflow">else</span> {
<a name="l01922"></a>01922                     $this-&gt;_plugins['modifier'][$_modifier_name] = array($_modifier_name,  null, null, <span class="keyword">false</span>);
<a name="l01923"></a>01923                 }
<a name="l01924"></a>01924             }
<a name="l01925"></a>01925             $this-&gt;<a class="code" href="classSmarty__Compiler.html#8dc53786beac8f4ca7c8d86cf1bbbd95">_add_plugin</a>('modifier', $_modifier_name);
<a name="l01926"></a>01926 
<a name="l01927"></a>01927             $this-&gt;<a class="code" href="classSmarty__Compiler.html#0e01da79d898117be860ab893d15b477">_parse_vars_props</a>($_modifier_args);
<a name="l01928"></a>01928 
<a name="l01929"></a>01929             <span class="keywordflow">if</span>($_modifier_name == '<span class="keywordflow">default</span>') {
<a name="l01930"></a>01930                 <span class="comment">// supress notifications of default modifier vars and args</span>
<a name="l01931"></a>01931                 <span class="keywordflow">if</span>(substr($output, 0, 1) == <span class="charliteral">'$'</span>) {
<a name="l01932"></a>01932                     $output = <span class="charliteral">'@'</span> . $output;
<a name="l01933"></a>01933                 }
<a name="l01934"></a>01934                 <span class="keywordflow">if</span>(isset($_modifier_args[0]) &amp;&amp; substr($_modifier_args[0], 0, 1) == <span class="charliteral">'$'</span>) {
<a name="l01935"></a>01935                     $_modifier_args[0] = <span class="charliteral">'@'</span> . $_modifier_args[0];
<a name="l01936"></a>01936                 }
<a name="l01937"></a>01937             }
<a name="l01938"></a>01938             <span class="keywordflow">if</span> (count($_modifier_args) &gt; 0)
<a name="l01939"></a>01939                 $_modifier_args = ', '.implode(', ', $_modifier_args);
<a name="l01940"></a>01940             <span class="keywordflow">else</span>
<a name="l01941"></a>01941                 $_modifier_args = '';
<a name="l01942"></a>01942 
<a name="l01943"></a>01943             <span class="keywordflow">if</span> ($_map_array) {
<a name="l01944"></a>01944                 $output = <span class="stringliteral">"((is_array(\$_tmp=$output)) ? \$this-&gt;_run_mod_handler('$_modifier_name', true, \$_tmp$_modifier_args) : "</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a>('modifier', $_modifier_name) . <span class="stringliteral">"(\$_tmp$_modifier_args))"</span>;
<a name="l01945"></a>01945 
<a name="l01946"></a>01946             } <span class="keywordflow">else</span> {
<a name="l01947"></a>01947 
<a name="l01948"></a>01948                 $output = $this-&gt;<a class="code" href="classSmarty__Compiler.html#302b33495a918bef95258bfb0285a30c">_compile_plugin_call</a>('modifier', $_modifier_name).<span class="stringliteral">"($output$_modifier_args)"</span>;
<a name="l01949"></a>01949 
<a name="l01950"></a>01950             }
<a name="l01951"></a>01951         }
<a name="l01952"></a>01952     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="a33dedec468797a2311562fdd976c870"></a><!-- doxytag: member="Smarty_Compiler::_parse_parenth_args" ref="a33dedec468797a2311562fdd976c870" args="($parenth_args)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_parenth_args           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>parenth_args</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
parse arguments in function call parenthesis 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$parenth_args </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01830">1830</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01831"></a>01831     {
<a name="l01832"></a>01832         preg_match_all(<span class="charliteral">'~'</span> . $this-&gt;_param_regexp . <span class="charliteral">'~'</span>,$parenth_args, $match);
<a name="l01833"></a>01833         $orig_vals = $match = $match[0];
<a name="l01834"></a>01834         $this-&gt;<a class="code" href="classSmarty__Compiler.html#0e01da79d898117be860ab893d15b477">_parse_vars_props</a>($match);
<a name="l01835"></a>01835         $replace = array();
<a name="l01836"></a>01836         <span class="keywordflow">for</span> ($i = 0, $count = count($match); $i &lt; $count; $i++) {
<a name="l01837"></a>01837             $replace[$orig_vals[$i]] = $match[$i];
<a name="l01838"></a>01838         }
<a name="l01839"></a>01839         <span class="keywordflow">return</span> strtr($parenth_args, $replace);
<a name="l01840"></a>01840     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="f3c3473a68eab6b7d9a08f7dd2357469"></a><!-- doxytag: member="Smarty_Compiler::_parse_section_prop" ref="f3c3473a68eab6b7d9a08f7dd2357469" args="($section_prop_expr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_section_prop           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>section_prop_expr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
parse section property expression into PHP code 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$section_prop_expr </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01868">1868</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01869"></a>01869     {
<a name="l01870"></a>01870         $parts = explode(<span class="charliteral">'|'</span>, $section_prop_expr, 2);
<a name="l01871"></a>01871         $var_ref = $parts[0];
<a name="l01872"></a>01872         $modifiers = isset($parts[1]) ? $parts[1] : '';
<a name="l01873"></a>01873 
<a name="l01874"></a>01874         preg_match('!%(\w+)\.(\w+)%!', $var_ref, $match);
<a name="l01875"></a>01875         $section_name = $match[1];
<a name="l01876"></a>01876         $prop_name = $match[2];
<a name="l01877"></a>01877 
<a name="l01878"></a>01878         $output = <span class="stringliteral">"\$this-&gt;_sections['$section_name']['$prop_name']"</span>;
<a name="l01879"></a>01879 
<a name="l01880"></a>01880         $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($output, $modifiers);
<a name="l01881"></a>01881 
<a name="l01882"></a>01882         <span class="keywordflow">return</span> $output;
<a name="l01883"></a>01883     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="2dcafc2754e3bdbda348d4b728d16a0e"></a><!-- doxytag: member="Smarty_Compiler::_parse_var" ref="2dcafc2754e3bdbda348d4b728d16a0e" args="($var_expr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_var           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>var_expr</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
parse variable expression into PHP code 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$var_expr </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$output </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01695">1695</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01696"></a>01696     {
<a name="l01697"></a>01697         $_has_math = <span class="keyword">false</span>;
<a name="l01698"></a>01698         $_math_vars = preg_split('~('.$this-&gt;_dvar_math_regexp.<span class="charliteral">'|'</span>.$this-&gt;_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
<a name="l01699"></a>01699 
<a name="l01700"></a>01700         <span class="keywordflow">if</span>(count($_math_vars) &gt; 1) {
<a name="l01701"></a>01701             $_first_var = <span class="stringliteral">""</span>;
<a name="l01702"></a>01702             $_complete_var = <span class="stringliteral">""</span>;
<a name="l01703"></a>01703             $_output = <span class="stringliteral">""</span>;
<a name="l01704"></a>01704             <span class="comment">// simple check if there is any math, to stop recursion (due to modifiers with "xx % yy" as parameter)</span>
<a name="l01705"></a>01705             foreach($_math_vars as $_k =&gt; $_math_var) {
<a name="l01706"></a>01706                 $_math_var = $_math_vars[$_k];
<a name="l01707"></a>01707 
<a name="l01708"></a>01708                 <span class="keywordflow">if</span>(!empty($_math_var) || is_numeric($_math_var)) {
<a name="l01709"></a>01709                     <span class="comment">// hit a math operator, so process the stuff which came before it</span>
<a name="l01710"></a>01710                     <span class="keywordflow">if</span>(preg_match('~^' . $this-&gt;_dvar_math_regexp . '$~', $_math_var)) {
<a name="l01711"></a>01711                         $_has_math = <span class="keyword">true</span>;
<a name="l01712"></a>01712                         <span class="keywordflow">if</span>(!empty($_complete_var) || is_numeric($_complete_var)) {
<a name="l01713"></a>01713                             $_output .= $this-&gt;<a class="code" href="classSmarty__Compiler.html#2dcafc2754e3bdbda348d4b728d16a0e">_parse_var</a>($_complete_var);
<a name="l01714"></a>01714                         }
<a name="l01715"></a>01715 
<a name="l01716"></a>01716                         <span class="comment">// just output the math operator to php</span>
<a name="l01717"></a>01717                         $_output .= $_math_var;
<a name="l01718"></a>01718 
<a name="l01719"></a>01719                         <span class="keywordflow">if</span>(empty($_first_var))
<a name="l01720"></a>01720                             $_first_var = $_complete_var;
<a name="l01721"></a>01721 
<a name="l01722"></a>01722                         $_complete_var = <span class="stringliteral">""</span>;
<a name="l01723"></a>01723                     } <span class="keywordflow">else</span> {
<a name="l01724"></a>01724                         $_complete_var .= $_math_var;
<a name="l01725"></a>01725                     }
<a name="l01726"></a>01726                 }
<a name="l01727"></a>01727             }
<a name="l01728"></a>01728             <span class="keywordflow">if</span>($_has_math) {
<a name="l01729"></a>01729                 <span class="keywordflow">if</span>(!empty($_complete_var) || is_numeric($_complete_var))
<a name="l01730"></a>01730                     $_output .= $this-&gt;<a class="code" href="classSmarty__Compiler.html#2dcafc2754e3bdbda348d4b728d16a0e">_parse_var</a>($_complete_var);
<a name="l01731"></a>01731 
<a name="l01732"></a>01732                 <span class="comment">// get the modifiers working (only the last var from math + modifier is left)</span>
<a name="l01733"></a>01733                 $var_expr = $_complete_var;
<a name="l01734"></a>01734             }
<a name="l01735"></a>01735         }
<a name="l01736"></a>01736 
<a name="l01737"></a>01737         <span class="comment">// prevent cutting of first digit in the number (we _definitly_ got a number if the first char is a digit)</span>
<a name="l01738"></a>01738         <span class="keywordflow">if</span>(is_numeric(substr($var_expr, 0, 1)))
<a name="l01739"></a>01739             $_var_ref = $var_expr;
<a name="l01740"></a>01740         <span class="keywordflow">else</span>
<a name="l01741"></a>01741             $_var_ref = substr($var_expr, 1);
<a name="l01742"></a>01742         
<a name="l01743"></a>01743         <span class="keywordflow">if</span>(!$_has_math) {
<a name="l01744"></a>01744             
<a name="l01745"></a>01745             <span class="comment">// get [foo] and .foo and -&gt;foo and (...) pieces</span>
<a name="l01746"></a>01746             preg_match_all('~(?:^\w+)|' . $this-&gt;_obj_params_regexp . '|(?:' . $this-&gt;_var_bracket_regexp . ')|-&gt;\$?\w+|\.\$?\w+|\S+~', $_var_ref, $match);
<a name="l01747"></a>01747                         
<a name="l01748"></a>01748             $_indexes = $match[0];
<a name="l01749"></a>01749             $_var_name = array_shift($_indexes);
<a name="l01750"></a>01750 
<a name="l01751"></a>01751             <span class="comment">/* Handle $smarty.* variable references as a special case. */</span>
<a name="l01752"></a>01752             <span class="keywordflow">if</span> ($_var_name == 'smarty') {
<a name="l01753"></a>01753                 <span class="comment">/*</span>
<a name="l01754"></a>01754 <span class="comment">                 * If the reference could be compiled, use the compiled output;</span>
<a name="l01755"></a>01755 <span class="comment">                 * otherwise, fall back on the $smarty variable generated at</span>
<a name="l01756"></a>01756 <span class="comment">                 * run-time.</span>
<a name="l01757"></a>01757 <span class="comment">                 */</span>
<a name="l01758"></a>01758                 <span class="keywordflow">if</span> (($smarty_ref = $this-&gt;<a class="code" href="classSmarty__Compiler.html#dc652b9fb4277fd8d33d957608394751">_compile_smarty_ref</a>($_indexes)) !== null) {
<a name="l01759"></a>01759                     $_output = $smarty_ref;
<a name="l01760"></a>01760                 } <span class="keywordflow">else</span> {
<a name="l01761"></a>01761                     $_var_name = substr(array_shift($_indexes), 1);
<a name="l01762"></a>01762                     $_output = <span class="stringliteral">"\$this-&gt;_smarty_vars['$_var_name']"</span>;
<a name="l01763"></a>01763                 }
<a name="l01764"></a>01764             } elseif(is_numeric($_var_name) &amp;&amp; is_numeric(substr($var_expr, 0, 1))) {
<a name="l01765"></a>01765                 <span class="comment">// because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers</span>
<a name="l01766"></a>01766                 <span class="keywordflow">if</span>(count($_indexes) &gt; 0)
<a name="l01767"></a>01767                 {
<a name="l01768"></a>01768                     $_var_name .= implode(<span class="stringliteral">""</span>, $_indexes);
<a name="l01769"></a>01769                     $_indexes = array();
<a name="l01770"></a>01770                 }
<a name="l01771"></a>01771                 $_output = $_var_name;
<a name="l01772"></a>01772             } <span class="keywordflow">else</span> {
<a name="l01773"></a>01773                 $_output = <span class="stringliteral">"\$this-&gt;_tpl_vars['$_var_name']"</span>;
<a name="l01774"></a>01774             }
<a name="l01775"></a>01775 
<a name="l01776"></a>01776             foreach ($_indexes as $_index) {
<a name="l01777"></a>01777                 <span class="keywordflow">if</span> (substr($_index, 0, 1) == <span class="charliteral">'['</span>) {
<a name="l01778"></a>01778                     $_index = substr($_index, 1, -1);
<a name="l01779"></a>01779                     <span class="keywordflow">if</span> (is_numeric($_index)) {
<a name="l01780"></a>01780                         $_output .= <span class="stringliteral">"[$_index]"</span>;
<a name="l01781"></a>01781                     } elseif (substr($_index, 0, 1) == <span class="charliteral">'$'</span>) {
<a name="l01782"></a>01782                         <span class="keywordflow">if</span> (strpos($_index, <span class="charliteral">'.'</span>) !== <span class="keyword">false</span>) {
<a name="l01783"></a>01783                             $_output .= <span class="charliteral">'['</span> . $this-&gt;<a class="code" href="classSmarty__Compiler.html#2dcafc2754e3bdbda348d4b728d16a0e">_parse_var</a>($_index) . <span class="charliteral">']'</span>;
<a name="l01784"></a>01784                         } <span class="keywordflow">else</span> {
<a name="l01785"></a>01785                             $_output .= <span class="stringliteral">"[\$this-&gt;_tpl_vars['"</span> . substr($_index, 1) . <span class="stringliteral">"']]"</span>;
<a name="l01786"></a>01786                         }
<a name="l01787"></a>01787                     } <span class="keywordflow">else</span> {
<a name="l01788"></a>01788                         $_var_parts = explode(<span class="charliteral">'.'</span>, $_index);
<a name="l01789"></a>01789                         $_var_section = $_var_parts[0];
<a name="l01790"></a>01790                         $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index';
<a name="l01791"></a>01791                         $_output .= <span class="stringliteral">"[\$this-&gt;_sections['$_var_section']['$_var_section_prop']]"</span>;
<a name="l01792"></a>01792                     }
<a name="l01793"></a>01793                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (substr($_index, 0, 1) == <span class="charliteral">'.'</span>) {
<a name="l01794"></a>01794                     <span class="keywordflow">if</span> (substr($_index, 1, 1) == <span class="charliteral">'$'</span>)
<a name="l01795"></a>01795                         $_output .= <span class="stringliteral">"[\$this-&gt;_tpl_vars['"</span> . substr($_index, 2) . <span class="stringliteral">"']]"</span>;
<a name="l01796"></a>01796                     <span class="keywordflow">else</span>
<a name="l01797"></a>01797                         $_output .= <span class="stringliteral">"['"</span> . substr($_index, 1) . <span class="stringliteral">"']"</span>;
<a name="l01798"></a>01798                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (substr($_index,0,2) == '-&gt;') {
<a name="l01799"></a>01799                     <span class="keywordflow">if</span>(substr($_index,2,2) == '__') {
<a name="l01800"></a>01800                         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
<a name="l01801"></a>01801                     } elseif($this-&gt;security &amp;&amp; substr($_index, 2, 1) == <span class="charliteral">'_'</span>) {
<a name="l01802"></a>01802                         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('(secure) call to <span class="keyword">private</span> object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
<a name="l01803"></a>01803                     } elseif (substr($_index, 2, 1) == <span class="charliteral">'$'</span>) {
<a name="l01804"></a>01804                         <span class="keywordflow">if</span> ($this-&gt;security) {
<a name="l01805"></a>01805                             $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
<a name="l01806"></a>01806                         } <span class="keywordflow">else</span> {
<a name="l01807"></a>01807                             $_output .= '-&gt;{(($_var=$this-&gt;_tpl_vars[\''.substr($_index,3).<span class="charliteral">'\'</span>]) &amp;&amp; substr($_var,0,2)!=\'__\') ? $_var : $this-&gt;<a class="code" href="classSmarty.html#92f740377d6a9b16164f0073194ff82d">trigger_error</a>(<span class="stringliteral">"cannot access property \\"</span>$_var\\<span class="stringliteral">""</span>)}';
<a name="l01808"></a>01808                         }
<a name="l01809"></a>01809                     } <span class="keywordflow">else</span> {
<a name="l01810"></a>01810                         $_output .= $_index;
<a name="l01811"></a>01811                     }
<a name="l01812"></a>01812                 } elseif (substr($_index, 0, 1) == <span class="charliteral">'('</span>) {
<a name="l01813"></a>01813                     $_index = $this-&gt;<a class="code" href="classSmarty__Compiler.html#a33dedec468797a2311562fdd976c870">_parse_parenth_args</a>($_index);
<a name="l01814"></a>01814                     $_output .= $_index;
<a name="l01815"></a>01815                 } <span class="keywordflow">else</span> {
<a name="l01816"></a>01816                     $_output .= $_index;
<a name="l01817"></a>01817                 }
<a name="l01818"></a>01818             }
<a name="l01819"></a>01819         }
<a name="l01820"></a>01820 
<a name="l01821"></a>01821         <span class="keywordflow">return</span> $_output;
<a name="l01822"></a>01822     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="c289c6c7cacaab608f81e68976acca77"></a><!-- doxytag: member="Smarty_Compiler::_parse_var_props" ref="c289c6c7cacaab608f81e68976acca77" args="($val)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_var_props           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>val</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile single variable and section properties token into PHP code 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$val </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$tag_attrs </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01609">1609</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01610"></a>01610     {
<a name="l01611"></a>01611         $val = trim($val);
<a name="l01612"></a>01612 
<a name="l01613"></a>01613         <span class="keywordflow">if</span>(preg_match('~^(' . $this-&gt;_obj_call_regexp . <span class="charliteral">'|'</span> . $this-&gt;_dvar_regexp . ')(' . $this-&gt;_mod_regexp . '*)$~', $val, $match)) {
<a name="l01614"></a>01614             <span class="comment">// $ variable or object</span>
<a name="l01615"></a>01615             $return = $this-&gt;<a class="code" href="classSmarty__Compiler.html#2dcafc2754e3bdbda348d4b728d16a0e">_parse_var</a>($match[1]);
<a name="l01616"></a>01616             $modifiers = $match[2];
<a name="l01617"></a>01617             <span class="keywordflow">if</span> (!empty($this-&gt;default_modifiers) &amp;&amp; !preg_match('~(^|\|)smarty:nodefaults($|\|)~',$modifiers)) {
<a name="l01618"></a>01618                 $_default_mod_string = implode(<span class="charliteral">'|'</span>,(array)$this-&gt;default_modifiers);
<a name="l01619"></a>01619                 $modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . <span class="charliteral">'|'</span> . $modifiers;
<a name="l01620"></a>01620             }
<a name="l01621"></a>01621             $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($return, $modifiers);
<a name="l01622"></a>01622             <span class="keywordflow">return</span> $return;
<a name="l01623"></a>01623         } elseif (preg_match('~^' . $this-&gt;_db_qstr_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $val)) {
<a name="l01624"></a>01624                 <span class="comment">// double quoted text</span>
<a name="l01625"></a>01625                 preg_match('~^(' . $this-&gt;_db_qstr_regexp . ')('. $this-&gt;_mod_regexp . '*)$~', $val, $match);
<a name="l01626"></a>01626                 $return = $this-&gt;<a class="code" href="classSmarty__Compiler.html#ba11f398aa3e57fbf119bb1d718e854c">_expand_quoted_text</a>($match[1]);
<a name="l01627"></a>01627                 <span class="keywordflow">if</span>($match[2] != '') {
<a name="l01628"></a>01628                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($return, $match[2]);
<a name="l01629"></a>01629                 }
<a name="l01630"></a>01630                 <span class="keywordflow">return</span> $return;
<a name="l01631"></a>01631             }
<a name="l01632"></a>01632         elseif(preg_match('~^' . $this-&gt;_num_const_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $val)) {
<a name="l01633"></a>01633                 <span class="comment">// numerical constant</span>
<a name="l01634"></a>01634                 preg_match('~^(' . $this-&gt;_num_const_regexp . ')('. $this-&gt;_mod_regexp . '*)$~', $val, $match);
<a name="l01635"></a>01635                 <span class="keywordflow">if</span>($match[2] != '') {
<a name="l01636"></a>01636                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($match[1], $match[2]);
<a name="l01637"></a>01637                     <span class="keywordflow">return</span> $match[1];
<a name="l01638"></a>01638                 }
<a name="l01639"></a>01639             }
<a name="l01640"></a>01640         elseif(preg_match('~^' . $this-&gt;_si_qstr_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $val)) {
<a name="l01641"></a>01641                 <span class="comment">// single quoted text</span>
<a name="l01642"></a>01642                 preg_match('~^(' . $this-&gt;_si_qstr_regexp . ')('. $this-&gt;_mod_regexp . '*)$~', $val, $match);
<a name="l01643"></a>01643                 <span class="keywordflow">if</span>($match[2] != '') {
<a name="l01644"></a>01644                     $this-&gt;<a class="code" href="classSmarty__Compiler.html#5f39bfb73d59e9ec871c9c558c3c5d86">_parse_modifiers</a>($match[1], $match[2]);
<a name="l01645"></a>01645                     <span class="keywordflow">return</span> $match[1];
<a name="l01646"></a>01646                 }
<a name="l01647"></a>01647             }
<a name="l01648"></a>01648         elseif(preg_match('~^' . $this-&gt;_cvar_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $val)) {
<a name="l01649"></a>01649                 <span class="comment">// config var</span>
<a name="l01650"></a>01650                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#5b6479977bec73b8ae0732c2b4f47d16">_parse_conf_var</a>($val);
<a name="l01651"></a>01651             }
<a name="l01652"></a>01652         elseif(preg_match('~^' . $this-&gt;_svar_regexp . '(?:' . $this-&gt;_mod_regexp . '*)$~', $val)) {
<a name="l01653"></a>01653                 <span class="comment">// section var</span>
<a name="l01654"></a>01654                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#f3c3473a68eab6b7d9a08f7dd2357469">_parse_section_prop</a>($val);
<a name="l01655"></a>01655             }
<a name="l01656"></a>01656         elseif(!in_array($val, $this-&gt;_permitted_tokens) &amp;&amp; !is_numeric($val)) {
<a name="l01657"></a>01657             <span class="comment">// literal string</span>
<a name="l01658"></a>01658             <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#ba11f398aa3e57fbf119bb1d718e854c">_expand_quoted_text</a>(<span class="charliteral">'"'</span> . strtr($val, array(<span class="charliteral">'\\'</span> =&gt; '\\\\', <span class="charliteral">'"'</span> =&gt; '\\<span class="stringliteral">"')) .'"</span>');
<a name="l01659"></a>01659         }
<a name="l01660"></a>01660         <span class="keywordflow">return</span> $val;
<a name="l01661"></a>01661     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="0e01da79d898117be860ab893d15b477"></a><!-- doxytag: member="Smarty_Compiler::_parse_vars_props" ref="0e01da79d898117be860ab893d15b477" args="(&amp;$tokens)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_parse_vars_props           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">&amp;$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>tokens</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
compile multiple variables and section properties tokens into PHP code 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>array</em>&nbsp;</td><td>$tokens </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l01594">1594</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l01595"></a>01595     {
<a name="l01596"></a>01596         foreach($tokens as $key =&gt; $val) {
<a name="l01597"></a>01597             $tokens[$key] = $this-&gt;<a class="code" href="classSmarty__Compiler.html#c289c6c7cacaab608f81e68976acca77">_parse_var_props</a>($val);
<a name="l01598"></a>01598         }
<a name="l01599"></a>01599     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="93a26417dd094b744f7835099e24df0b"></a><!-- doxytag: member="Smarty_Compiler::_pop_cacheable_state" ref="93a26417dd094b744f7835099e24df0b" args="($type, $name)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_pop_cacheable_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
check if the compilation changes from non-cacheable to cacheable state with the end of the current plugin return php-code to reflect the transition. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02235">2235</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02235"></a>02235                                                 {
<a name="l02236"></a>02236         $_cacheable = !isset($this-&gt;_plugins[$type][$name]) || $this-&gt;_plugins[$type][$name][4];
<a name="l02237"></a>02237         <span class="keywordflow">if</span> ($_cacheable
<a name="l02238"></a>02238             || --$this-&gt;_cacheable_state&gt;0) <span class="keywordflow">return</span> '';
<a name="l02239"></a>02239         <span class="keywordflow">return</span> '<span class="keywordflow">if</span> ($this-&gt;caching &amp;&amp; !$this-&gt;_cache_including) { echo \'{/nocache:'
<a name="l02240"></a>02240             . $this-&gt;_cache_serial . <span class="charliteral">'#'</span> . ($this-&gt;_nocache_count++)
<a name="l02241"></a>02241             . '}\'; };';
<a name="l02242"></a>02242     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="17a75d1aa9db594013757d6a829436a9"></a><!-- doxytag: member="Smarty_Compiler::_pop_tag" ref="17a75d1aa9db594013757d6a829436a9" args="($close_tag)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_pop_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>close_tag</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pop closing tag-name raise an error if this stack-top doesn't match with the closing tag 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>the closing tag's name </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string the opening tag's name </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02260">2260</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02261"></a>02261     {
<a name="l02262"></a>02262         $message = '';
<a name="l02263"></a>02263         <span class="keywordflow">if</span> (count($this-&gt;_tag_stack)&gt;0) {
<a name="l02264"></a>02264             list($_open_tag, $_line_no) = array_pop($this-&gt;_tag_stack);
<a name="l02265"></a>02265             <span class="keywordflow">if</span> ($close_tag == $_open_tag) {
<a name="l02266"></a>02266                 <span class="keywordflow">return</span> $_open_tag;
<a name="l02267"></a>02267             }
<a name="l02268"></a>02268             <span class="keywordflow">if</span> ($close_tag == '<span class="keywordflow">if</span>' &amp;&amp; ($_open_tag == '<span class="keywordflow">else</span>' || $_open_tag == 'elseif' )) {
<a name="l02269"></a>02269                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>($close_tag);
<a name="l02270"></a>02270             }
<a name="l02271"></a>02271             <span class="keywordflow">if</span> ($close_tag == 'section' &amp;&amp; $_open_tag == 'sectionelse') {
<a name="l02272"></a>02272                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>($close_tag);
<a name="l02273"></a>02273                 <span class="keywordflow">return</span> $_open_tag;
<a name="l02274"></a>02274             }
<a name="l02275"></a>02275             <span class="keywordflow">if</span> ($close_tag == 'foreach' &amp;&amp; $_open_tag == 'foreachelse') {
<a name="l02276"></a>02276                 $this-&gt;<a class="code" href="classSmarty__Compiler.html#17a75d1aa9db594013757d6a829436a9">_pop_tag</a>($close_tag);
<a name="l02277"></a>02277                 <span class="keywordflow">return</span> $_open_tag;
<a name="l02278"></a>02278             }
<a name="l02279"></a>02279             <span class="keywordflow">if</span> ($_open_tag == '<span class="keywordflow">else</span>' || $_open_tag == 'elseif') {
<a name="l02280"></a>02280                 $_open_tag = '<span class="keywordflow">if</span>';
<a name="l02281"></a>02281             } elseif ($_open_tag == 'sectionelse') {
<a name="l02282"></a>02282                 $_open_tag = 'section';
<a name="l02283"></a>02283             } elseif ($_open_tag == 'foreachelse') {
<a name="l02284"></a>02284                 $_open_tag = 'foreach';
<a name="l02285"></a>02285             }
<a name="l02286"></a>02286             $message = <span class="stringliteral">" expected {/$_open_tag} (opened line $_line_no)."</span>;
<a name="l02287"></a>02287         }
<a name="l02288"></a>02288         $this-&gt;<a class="code" href="classSmarty__Compiler.html#059eb89b6a2caca24b4dca502cb79ed9">_syntax_error</a>(<span class="stringliteral">"mismatched tag {/$close_tag}.$message"</span>,
<a name="l02289"></a>02289                              E_USER_ERROR, __FILE__, __LINE__);
<a name="l02290"></a>02290     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="ecdd6b87ba3fdd6efb84b56c5e4dde17"></a><!-- doxytag: member="Smarty_Compiler::_push_cacheable_state" ref="ecdd6b87ba3fdd6efb84b56c5e4dde17" args="($type, $name)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_push_cacheable_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>name</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
check if the compilation changes from cacheable to non-cacheable state with the beginning of the current plugin. 
<p>
return php-code to reflect the transition. <dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02217">2217</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02217"></a>02217                                                  {
<a name="l02218"></a>02218         $_cacheable = !isset($this-&gt;_plugins[$type][$name]) || $this-&gt;_plugins[$type][$name][4];
<a name="l02219"></a>02219         <span class="keywordflow">if</span> ($_cacheable
<a name="l02220"></a>02220             || 0&lt;$this-&gt;_cacheable_state++) <span class="keywordflow">return</span> '';
<a name="l02221"></a>02221         <span class="keywordflow">if</span> (!isset($this-&gt;_cache_serial)) $this-&gt;_cache_serial = md5(uniqid('<a class="code" href="classSmarty.html">Smarty</a>'));
<a name="l02222"></a>02222         $_ret = '<span class="keywordflow">if</span> ($this-&gt;caching &amp;&amp; !$this-&gt;_cache_including) { echo \'{nocache:'
<a name="l02223"></a>02223             . $this-&gt;_cache_serial . <span class="charliteral">'#'</span> . $this-&gt;_nocache_count
<a name="l02224"></a>02224             . '}\'; };';
<a name="l02225"></a>02225         <span class="keywordflow">return</span> $_ret;
<a name="l02226"></a>02226     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="553d4bd92f21bc3714bf1cadeb61a9d7"></a><!-- doxytag: member="Smarty_Compiler::_push_tag" ref="553d4bd92f21bc3714bf1cadeb61a9d7" args="($open_tag)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_push_tag           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>open_tag</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
push opening tag-name, file-name and line-number on the tag-stack 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>the opening tag's name </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02249">2249</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02250"></a>02250     {
<a name="l02251"></a>02251         array_push($this-&gt;_tag_stack, array($open_tag, $this-&gt;_current_line_no));
<a name="l02252"></a>02252     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="bc08d6f05e29019bfff39a7e9d315feb"></a><!-- doxytag: member="Smarty_Compiler::_quote_replace" ref="bc08d6f05e29019bfff39a7e9d315feb" args="($string)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_quote_replace           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>string</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Quote subpattern references. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$string </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string </dd></dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02192">2192</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.
<p>
Referenced by <a class="el" href="Smarty__Compiler_8class_8php-source.html#l00225">_compile_file()</a>.<div class="fragment"><pre class="fragment"><a name="l02193"></a>02193     {
<a name="l02194"></a>02194         <span class="keywordflow">return</span> strtr($string, array(<span class="charliteral">'\\'</span> =&gt; '\\\\', <span class="charliteral">'$'</span> =&gt; '\\$'));
<a name="l02195"></a>02195     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="059eb89b6a2caca24b4dca502cb79ed9"></a><!-- doxytag: member="Smarty_Compiler::_syntax_error" ref="059eb89b6a2caca24b4dca502cb79ed9" args="($error_msg, $error_type=E_USER_ERROR, $file=null, $line=null)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Smarty_Compiler::_syntax_error           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>error_msg</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>error_type</em> = <code>E_USER_ERROR</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>file</em> = <code>null</code>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>line</em> = <code>null</code></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
display <a class="el" href="classSmarty.html">Smarty</a> syntax error 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$error_msg </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>integer</em>&nbsp;</td><td>$error_type </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>$file </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>integer</em>&nbsp;</td><td>$line </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="Smarty__Compiler_8class_8php-source.html#l02205">2205</a> of file <a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a>.<div class="fragment"><pre class="fragment"><a name="l02206"></a>02206     {
<a name="l02207"></a>02207         $this-&gt;<a class="code" href="classSmarty.html#2af2bdd132f9c210183775c0bf1c22d9">_trigger_fatal_error</a>(<span class="stringliteral">"syntax error: $error_msg"</span>, $this-&gt;_current_file, $this-&gt;_current_line_no, $file, $line, $error_type);
<a name="l02208"></a>02208     }
</pre></div>
<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>public_html/sa-v_0_3/lib/Smarty-2.6.14/libs/<a class="el" href="Smarty__Compiler_8class_8php-source.html">Smarty_Compiler.class.php</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sun Jun 18 17:46:31 2006 for SA PHP Application Framework by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>
Return current item: SA PHP Framework