Deployed 7a323b73 to 5.x with MkDocs 1.4.2 and mike 1.1.2

This commit is contained in:
Simon Wisselink
2023-02-06 15:19:57 +01:00
parent 6479b09d49
commit 1fe63047ac
23 changed files with 60 additions and 44 deletions

View File

@@ -2117,7 +2117,7 @@ value.</p>
<p>A database (PDO) example of looping over search results. This example is <p>A database (PDO) example of looping over search results. This example is
looping over a PHP iterator instead of an array().</p> looping over a PHP iterator instead of an array().</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="cp">&lt;?php</span> <div class="highlight"><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="cp">&lt;?php</span>
<a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a> <span class="k">include</span><span class="p">(</span><span class="s1">&#39;Smarty.class.php&#39;</span><span class="p">);</span> <a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a> <span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a> <a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a>
<a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a> <span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">;</span> <a id="__codelineno-10-4" name="__codelineno-10-4" href="#__codelineno-10-4"></a> <span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">;</span>
<a id="__codelineno-10-5" name="__codelineno-10-5" href="#__codelineno-10-5"></a> <a id="__codelineno-10-5" name="__codelineno-10-5" href="#__codelineno-10-5"></a>

View File

@@ -1889,7 +1889,7 @@
(<code>$</code>) sign.</p> (<code>$</code>) sign.</p>
<h2 id="examples">Examples</h2> <h2 id="examples">Examples</h2>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="cp">&lt;?php</span> <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="cp">&lt;?php</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span> <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span>
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a>
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">assign</span><span class="p">(</span><span class="s1">&#39;firstname&#39;</span><span class="p">,</span> <span class="s1">&#39;Doug&#39;</span><span class="p">);</span> <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">assign</span><span class="p">(</span><span class="s1">&#39;firstname&#39;</span><span class="p">,</span> <span class="s1">&#39;Doug&#39;</span><span class="p">);</span>

View File

@@ -1884,7 +1884,8 @@
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="cp">&lt;?php</span> <div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="cp">&lt;?php</span>
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a> <a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="k">require</span> <span class="s1">&#39;vendor/autoload.php&#39;</span><span class="p">;</span> <a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="k">require</span> <span class="s1">&#39;vendor/autoload.php&#39;</span><span class="p">;</span>
<a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span> <a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span>
</code></pre></div></p> </code></pre></div></p>
<p>Now that the library files are in place, it's time to set up the Smarty <p>Now that the library files are in place, it's time to set up the Smarty
directories for your application.</p> directories for your application.</p>
@@ -1897,7 +1898,7 @@ directories for your application.</p>
relative to the current working directory.</p> relative to the current working directory.</p>
<p>The defaults can be changed as follows:</p> <p>The defaults can be changed as follows:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="cp">&lt;?php</span> <div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="cp">&lt;?php</span>
<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a> <a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span> <a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span>
<a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setTemplateDir</span><span class="p">(</span><span class="s1">&#39;/some/template/dir&#39;</span><span class="p">);</span> <a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setTemplateDir</span><span class="p">(</span><span class="s1">&#39;/some/template/dir&#39;</span><span class="p">);</span>
<a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setConfigDir</span><span class="p">(</span><span class="s1">&#39;/some/config/dir&#39;</span><span class="p">);</span> <a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setConfigDir</span><span class="p">(</span><span class="s1">&#39;/some/config/dir&#39;</span><span class="p">);</span>
@@ -1920,12 +1921,14 @@ being used.</p>
</code></pre></div> </code></pre></div>
<p>You can verify if your system has the correct access rights for <p>You can verify if your system has the correct access rights for
these directories with <a href="../programmers/api-functions/api-test-install/"><code>testInstall()</code></a>:</p> these directories with <a href="../programmers/api-functions/api-test-install/"><code>testInstall()</code></a>:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="x">$smarty = new Smarty();</span> <div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a><span class="cp">&lt;?php</span>
<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="x">$smarty-&gt;setTemplateDir(&#39;/some/template/dir&#39;);</span> <a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="x">$smarty-&gt;setConfigDir(&#39;/some/config/dir&#39;);</span> <a id="__codelineno-6-3" name="__codelineno-6-3" href="#__codelineno-6-3"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span>
<a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a><span class="x">$smarty-&gt;setCompileDir(&#39;/some/compile/dir&#39;);</span> <a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setTemplateDir</span><span class="p">(</span><span class="s1">&#39;/some/template/dir&#39;</span><span class="p">);</span>
<a id="__codelineno-6-5" name="__codelineno-6-5" href="#__codelineno-6-5"></a><span class="x">$smarty-&gt;setCacheDir(&#39;/some/cache/dir&#39;);</span> <a id="__codelineno-6-5" name="__codelineno-6-5" href="#__codelineno-6-5"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setConfigDir</span><span class="p">(</span><span class="s1">&#39;/some/config/dir&#39;</span><span class="p">);</span>
<a id="__codelineno-6-6" name="__codelineno-6-6" href="#__codelineno-6-6"></a><span class="x">$smarty-&gt;testInstall();</span> <a id="__codelineno-6-6" name="__codelineno-6-6" href="#__codelineno-6-6"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCompileDir</span><span class="p">(</span><span class="s1">&#39;/some/compile/dir&#39;</span><span class="p">);</span>
<a id="__codelineno-6-7" name="__codelineno-6-7" href="#__codelineno-6-7"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCacheDir</span><span class="p">(</span><span class="s1">&#39;/some/cache/dir&#39;</span><span class="p">);</span>
<a id="__codelineno-6-8" name="__codelineno-6-8" href="#__codelineno-6-8"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">testInstall</span><span class="p">();</span>
</code></pre></div> </code></pre></div>
<p>Now, let's create the <code>index.tpl</code> file that Smarty will display. This <p>Now, let's create the <code>index.tpl</code> file that Smarty will display. This
needs to be located in the <a href="../programmers/api-variables/variable-template-dir/"><code>$template_dir</code></a>.</p> needs to be located in the <a href="../programmers/api-variables/variable-template-dir/"><code>$template_dir</code></a>.</p>
@@ -1947,15 +1950,16 @@ recognize the file and turn on special syntax highlighting.</p>
<a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a> <a id="__codelineno-8-2" name="__codelineno-8-2" href="#__codelineno-8-2"></a>
<a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a><span class="k">require</span> <span class="s1">&#39;vendor/autoload.php&#39;</span><span class="p">;</span> <a id="__codelineno-8-3" name="__codelineno-8-3" href="#__codelineno-8-3"></a><span class="k">require</span> <span class="s1">&#39;vendor/autoload.php&#39;</span><span class="p">;</span>
<a id="__codelineno-8-4" name="__codelineno-8-4" href="#__codelineno-8-4"></a> <a id="__codelineno-8-4" name="__codelineno-8-4" href="#__codelineno-8-4"></a>
<a id="__codelineno-8-5" name="__codelineno-8-5" href="#__codelineno-8-5"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span> <a id="__codelineno-8-5" name="__codelineno-8-5" href="#__codelineno-8-5"></a><span class="k">use</span> <span class="nx">Smarty\Smarty</span><span class="p">;</span>
<a id="__codelineno-8-6" name="__codelineno-8-6" href="#__codelineno-8-6"></a> <a id="__codelineno-8-6" name="__codelineno-8-6" href="#__codelineno-8-6"></a><span class="nv">$smarty</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Smarty</span><span class="p">();</span>
<a id="__codelineno-8-7" name="__codelineno-8-7" href="#__codelineno-8-7"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setTemplateDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/templates/&#39;</span><span class="p">);</span> <a id="__codelineno-8-7" name="__codelineno-8-7" href="#__codelineno-8-7"></a>
<a id="__codelineno-8-8" name="__codelineno-8-8" href="#__codelineno-8-8"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCompileDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/templates_c/&#39;</span><span class="p">);</span> <a id="__codelineno-8-8" name="__codelineno-8-8" href="#__codelineno-8-8"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setTemplateDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/templates/&#39;</span><span class="p">);</span>
<a id="__codelineno-8-9" name="__codelineno-8-9" href="#__codelineno-8-9"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setConfigDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/configs/&#39;</span><span class="p">);</span> <a id="__codelineno-8-9" name="__codelineno-8-9" href="#__codelineno-8-9"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCompileDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/templates_c/&#39;</span><span class="p">);</span>
<a id="__codelineno-8-10" name="__codelineno-8-10" href="#__codelineno-8-10"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCacheDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/cache/&#39;</span><span class="p">);</span> <a id="__codelineno-8-10" name="__codelineno-8-10" href="#__codelineno-8-10"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setConfigDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/configs/&#39;</span><span class="p">);</span>
<a id="__codelineno-8-11" name="__codelineno-8-11" href="#__codelineno-8-11"></a> <a id="__codelineno-8-11" name="__codelineno-8-11" href="#__codelineno-8-11"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">setCacheDir</span><span class="p">(</span><span class="s1">&#39;/web/www.example.com/guestbook/cache/&#39;</span><span class="p">);</span>
<a id="__codelineno-8-12" name="__codelineno-8-12" href="#__codelineno-8-12"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">assign</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">,</span> <span class="s1">&#39;Ned&#39;</span><span class="p">);</span> <a id="__codelineno-8-12" name="__codelineno-8-12" href="#__codelineno-8-12"></a>
<a id="__codelineno-8-13" name="__codelineno-8-13" href="#__codelineno-8-13"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">display</span><span class="p">(</span><span class="s1">&#39;index.tpl&#39;</span><span class="p">);</span> <a id="__codelineno-8-13" name="__codelineno-8-13" href="#__codelineno-8-13"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">assign</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">,</span> <span class="s1">&#39;Ned&#39;</span><span class="p">);</span>
<a id="__codelineno-8-14" name="__codelineno-8-14" href="#__codelineno-8-14"></a><span class="nv">$smarty</span><span class="o">-&gt;</span><span class="na">display</span><span class="p">(</span><span class="s1">&#39;index.tpl&#39;</span><span class="p">);</span>
</code></pre></div> </code></pre></div>
<blockquote> <blockquote>
<p><strong>Note</strong></p> <p><strong>Note</strong></p>

View File

@@ -1878,6 +1878,8 @@ static classes or assigned objects can be accessed (beginning with
Smarty_Security class or create an instance of it.</p> Smarty_Security class or create an instance of it.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
class My_Security_Policy extends \Smarty\Security { class My_Security_Policy extends \Smarty\Security {
public $allow_constants = false; public $allow_constants = false;
} }
@@ -1888,6 +1890,7 @@ $smarty-&gt;enableSecurity(&#39;My_Security_Policy&#39;);
&lt;?php &lt;?php
use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$my_security_policy = new \Smarty\Security($smarty); $my_security_policy = new \Smarty\Security($smarty);
$my_security_policy-&gt;allow_constants = false; $my_security_policy-&gt;allow_constants = false;
@@ -1897,7 +1900,7 @@ $smarty-&gt;enableSecurity($my_security_policy);
&lt;?php &lt;?php
require &#39;Smarty.class.php&#39;; use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
// enable default security // enable default security
$smarty-&gt;enableSecurity(); $smarty-&gt;enableSecurity();

View File

@@ -1818,7 +1818,7 @@ parameters:</p>
Use is on own risk.</p> Use is on own risk.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
include(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// force compilation of all config files // force compilation of all config files

View File

@@ -1824,7 +1824,7 @@ must register all of them before running this function.</p>
compiled files of parent templates which will never be used.</p> compiled files of parent templates which will never be used.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
include(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// force compilation of all template files // force compilation of all template files

View File

@@ -1796,7 +1796,7 @@ the following parameters:</p>
<p>Data objects are used to create scopes for assigned variables. They can <p>Data objects are used to create scopes for assigned variables. They can
be used to control which variables are seen by which templates.</p> be used to control which variables are seen by which templates.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
include(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// create data object with its private variable scope // create data object with its private variable scope

View File

@@ -1821,7 +1821,7 @@ following parameters:</p>
<!-- --> <!-- -->
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
include(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// create template object with its private variable scope // create template object with its private variable scope

View File

@@ -1793,7 +1793,7 @@ optional second parameter, you can pass a <code>$cache id</code>, see the <a hre
section</a> for more information.</p> section</a> for more information.</p>
<p>PARAMETER.COMPILEID</p> <p>PARAMETER.COMPILEID</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
include(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(true); $smarty-&gt;setCaching(true);

View File

@@ -1790,6 +1790,7 @@
otherwise. If security is enabled, classes registered with otherwise. If security is enabled, classes registered with
<code>registerClass()</code> are accessible to templates.</p> <code>registerClass()</code> are accessible to templates.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
class Bar { class Bar {
$property = &quot;hello world&quot;; $property = &quot;hello world&quot;;
@@ -1810,6 +1811,8 @@ $smarty-&gt;registerClass(&quot;Foo&quot;, &quot;Bar&quot;);
&lt;?php &lt;?php
use Smarty\Smarty;
namespace my\php\application { namespace my\php\application {
class Bar { class Bar {
$property = &quot;hello world&quot;; $property = &quot;hello world&quot;;

View File

@@ -1792,7 +1792,7 @@ resolve it by calling the registered default plugin handler. The handler
may be called several times for same undefined tag looping over valid may be called several times for same undefined tag looping over valid
plugin types.</p> plugin types.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;registerDefaultPluginHandler(&#39;my_plugin_handler&#39;); $smarty-&gt;registerDefaultPluginHandler(&#39;my_plugin_handler&#39;);

View File

@@ -1784,7 +1784,7 @@
<p>This function verifies that all required working folders of the Smarty <p>This function verifies that all required working folders of the Smarty
installation can be accessed. It does output a corresponding protocol.</p> installation can be accessed. It does output a corresponding protocol.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require_once(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;testInstall(); $smarty-&gt;testInstall();
?&gt; ?&gt;

View File

@@ -1786,7 +1786,7 @@ is not triggered when the resource itself cannot be found, in which
case a \Smarty\Exception is thrown.</p> case a \Smarty\Exception is thrown.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;default_config_handler_func = &#39;my_default_config_handler_func&#39;; $smarty-&gt;default_config_handler_func = &#39;my_default_config_handler_func&#39;;

View File

@@ -1786,7 +1786,7 @@ is not triggered when the resource itself cannot be found, in which
case a \Smarty\Exception is thrown.</p> case a \Smarty\Exception is thrown.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;default_template_handler_func = &#39;my_default_template_handler_func&#39;; $smarty-&gt;default_template_handler_func = &#39;my_default_template_handler_func&#39;;

View File

@@ -1809,7 +1809,7 @@ In either case you need to set <a href="#variable.caching.type"><code>$caching_t
to invoke your custom CacheResource implementation.</p> to invoke your custom CacheResource implementation.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require_once &#39;libs/Smarty.class.php&#39;; use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;caching_type = &#39;mysql&#39;; $smarty-&gt;caching_type = &#39;mysql&#39;;
@@ -1969,7 +1969,7 @@ class My_CacheResource_Mysql extends \Smarty\Cacheresource\Custom {
&lt;?php &lt;?php
require_once &#39;libs/Smarty.class.php&#39;; use Smarty\Smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;caching_type = &#39;memcache&#39;; $smarty-&gt;caching_type = &#39;memcache&#39;;

View File

@@ -1818,7 +1818,7 @@ structure that mimics your template file structure, such as
<code>display('themes/blue/index.tpl','themes|blue')</code>, then clear them with <code>display('themes/blue/index.tpl','themes|blue')</code>, then clear them with
<code>clearCache(null,'themes|blue')</code>.</p> <code>clearCache(null,'themes|blue')</code>.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);

View File

@@ -1784,7 +1784,7 @@ contents depending on some condition, and you want separate caches for
each one. You can do this by passing a <code>$cache_id</code> as the second each one. You can do this by passing a <code>$cache_id</code> as the second
parameter to the function call.</p> parameter to the function call.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);
@@ -1816,7 +1816,7 @@ database. Check for this!</p>
<p>Be sure to pass the same <code>$cache_id</code> as the second parameter to <p>Be sure to pass the same <code>$cache_id</code> as the second parameter to
<a href="#api.is.cached"><code>isCached()</code></a> and <a href="#api.clear.cache"><code>clearCache()</code></a>.</p> <a href="#api.is.cached"><code>isCached()</code></a> and <a href="#api.clear.cache"><code>clearCache()</code></a>.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);
@@ -1835,7 +1835,7 @@ $smarty-&gt;display(&#39;index.tpl&#39;,$my_cache_id);
<p>You can clear all caches for a particular <code>$cache_id</code> by passing NULL as <p>You can clear all caches for a particular <code>$cache_id</code> by passing NULL as
the first parameter to <a href="#api.clear.cache"><code>clearCache()</code></a>.</p> the first parameter to <a href="#api.clear.cache"><code>clearCache()</code></a>.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);

View File

@@ -1781,7 +1781,7 @@
<a href="#variable.caching"><code>$caching</code></a> to one of <a href="#variable.caching"><code>$caching</code></a> to one of
<code>\Smarty\Smarty::CACHING_LIFETIME_CURRENT</code> or <code>Smarty::CACHING_LIFETIME_SAVED</code>.</p> <code>\Smarty\Smarty::CACHING_LIFETIME_CURRENT</code> or <code>Smarty::CACHING_LIFETIME_SAVED</code>.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// uses the value of $smarty-&gt;cacheLifetime() to determine // uses the value of $smarty-&gt;cacheLifetime() to determine
@@ -1810,7 +1810,7 @@ setting <a href="#variable.caching"><code>$caching</code></a> to
<code>\Smarty\Smarty::CACHING_LIFETIME_SAVED</code>. See <code>\Smarty\Smarty::CACHING_LIFETIME_SAVED</code>. See
<a href="#variable.cache.lifetime"><code>$cache_lifetime</code></a> for more details.</p> <a href="#variable.cache.lifetime"><code>$cache_lifetime</code></a> for more details.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
// retain current cache lifetime for each specific display call // retain current cache lifetime for each specific display call
@@ -1840,7 +1840,7 @@ since the cache was generated, the cache is immediately regenerated.
This is a computational overhead, so for optimum performance set This is a computational overhead, so for optimum performance set
<a href="#variable.compile.check"><code>$compile_check</code></a> to FALSE.</p> <a href="#variable.compile.check"><code>$compile_check</code></a> to FALSE.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);
@@ -1861,7 +1861,7 @@ template has a valid cache or not. If you have a cached template that
requires something like a database fetch, you can use this to skip that requires something like a database fetch, you can use this to skip that
process.</p> process.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);
@@ -1887,7 +1887,7 @@ keep this element dynamic within the cached content.</p>
files <a href="#caching.groups">and groups</a> with the files <a href="#caching.groups">and groups</a> with the
<a href="#api.clear.cache"><code>clearCache()</code></a> function.</p> <a href="#api.clear.cache"><code>clearCache()</code></a> function.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
require(&#39;Smarty.class.php&#39;); use Smarty\Smarty;
$smarty = new Smarty; $smarty = new Smarty;
$smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT); $smarty-&gt;setCaching(Smarty::CACHING_LIFETIME_CURRENT);

View File

@@ -1802,6 +1802,8 @@ overhead. See <code>src/Resource/StringEval.php</code> for an
example.</p> example.</p>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
/** /**
* MySQL Resource * MySQL Resource
* *
@@ -1878,7 +1880,7 @@ class My_Resource_Mysql extends \Smarty\Resource\CustomPlugin {
} }
require_once &#39;libs/Smarty.class.php&#39;;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql()); $smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql());

View File

@@ -1790,6 +1790,8 @@ some other way by registering under another resource name.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
/** /**
* MySQL Resource * MySQL Resource
* *
@@ -1866,7 +1868,7 @@ class My_Resource_Mysql extends \Smarty\Resource\Custom {
} }
require_once &#39;libs/Smarty.class.php&#39;;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql()); $smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql());

View File

@@ -1818,6 +1818,8 @@ can provide a resource that fetches templates from the file system in
some other way by registering under another resource name.</p> some other way by registering under another resource name.</p>
</blockquote> </blockquote>
<div class="highlight"><pre><span></span><code>&lt;?php <div class="highlight"><pre><span></span><code>&lt;?php
use Smarty\Smarty;
/** /**
* MySQL Resource * MySQL Resource
@@ -1895,7 +1897,7 @@ class My_Resource_Mysql extends \Smarty\Resource\Custom {
} }
require_once &#39;libs/Smarty.class.php&#39;;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql()); $smarty-&gt;registerResource(&#39;mysql&#39;, new My_Resource_Mysql());

File diff suppressed because one or more lines are too long

Binary file not shown.