WS, and switched to methodsynppsis

This commit is contained in:
didou
2004-04-18 19:22:55 +00:00
parent 2e4e68462c
commit bdafb7ea6c
38 changed files with 1165 additions and 1000 deletions

View File

@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.append.by.ref">
<title>append_by_ref</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>append_by_ref</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>append_by_ref</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
<paramdef>boolean <parameter>merge</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.append.by.ref">
<refnamediv>
<refname>append_by_ref</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>append_by_ref</methodname>
<methodparam><type>string</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>merge</parameter></methodparam>
</methodsynopsis>
<para>
This is used to append values to the templates by reference.
If you append a variable by reference then change its
@@ -27,10 +25,10 @@
<note>
<title>Technical Note</title>
<para>
The merge parameter respects array keys, so if you merge two
numerically indexed arrays, they may overwrite each other or result in
non-sequential keys. This is unlike the array_merge() function of PHP
which wipes out numerical keys and renumbers them.
The <parameter>merge</parameter> parameter respects array keys, so if
you merge two numerically indexed arrays, they may overwrite each other
or result in non-sequential keys. This is unlike the array_merge() function
of PHP which wipes out numerical keys and renumbers them.
</para>
</note>
<example>
@@ -43,9 +41,10 @@ $smarty->append_by_ref("Name", $myname);
$smarty->append_by_ref("Address", $address);
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,24 +1,22 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.append">
<title>append</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>append</function></funcdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>append</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>append</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
<paramdef>boolean <parameter>merge</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.append">
<refnamediv>
<refname>append</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>append</methodname>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>void</type><methodname>append</methodname>
<methodparam><type>string</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>merge</parameter></methodparam>
</methodsynopsis>
<para>
This is used to append an element to an assigned array. If you append
to a string value, it is converted to an array value and then
@@ -42,16 +40,17 @@
<![CDATA[
<?php
// passing name/value pairs
$smarty->append("Name","Fred");
$smarty->append("Address",$address);
$smarty->append("Name", "Fred");
$smarty->append("Address", $address);
// passing an associative array
$smarty->append(array("city" => "Lincoln","state" => "Nebraska"));
$smarty->append(array("city" => "Lincoln", "state" => "Nebraska"));
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.assign.by.ref">
<title>assign_by_ref</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>assign_by_ref</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.assign.by.ref">
<refnamediv>
<refname>assign_by_ref</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>assign_by_ref</methodname>
<methodparam><type>string</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<para>
This is used to assign values to the templates by reference instead of
making a copy. See the PHP manual on variable referencing for an explanation.
@@ -34,9 +37,10 @@ $smarty->assign_by_ref('Name', $myname);
$smarty->assign_by_ref('Address', $address);
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.assign">
<title>assign</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>assign</function></funcdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>assign</function></funcdef>
<paramdef>string <parameter>varname</parameter></paramdef>
<paramdef>mixed <parameter>var</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.assign">
<refnamediv>
<refname>assign</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>assign</methodname>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>void</type><methodname>assign</methodname>
<methodparam><type>string</type><parameter>varname</parameter></methodparam>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<para>
This is used to assign values to the templates. You can
explicitly pass name/value pairs, or associative arrays
@@ -31,9 +34,10 @@ $smarty->assign('Address', $address);
$smarty->assign(array("city" => "Lincoln", "state" => "Nebraska"));
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,28 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.all.assign">
<title>clear_all_assign</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>clear_all_assign</function></funcdef>
<paramdef><parameter></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.clear.all.assign">
<refnamediv>
<refname>clear_all_assign</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_all_assign</methodname>
<void />
</methodsynopsis>
<para>
This clears the values of all assigned variables.
</para>
<example>
<title>clear_all_assign</title>
<programlisting role="php">
<example>
<title>clear_all_assign</title>
<programlisting role="php">
<![CDATA[
<?php
// clear all assigned variables
$smarty->clear_all_assign();
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,30 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.all.cache">
<title>clear_all_cache</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>clear_all_cache</function></funcdef>
<paramdef>int <parameter>expire time</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.clear.all.cache">
<refnamediv>
<refname>clear_all_cache</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_all_cache</methodname>
<methodparam choice="opt"><type>int</type><parameter>expire_time</parameter></methodparam>
</methodsynopsis>
<para>
This clears the entire template cache. As an optional
parameter, you can supply a minimum age in seconds the cache
files must be before they will get cleared.
</para>
<example>
<title>clear_all_cache</title>
<programlisting role="php">
<example>
<title>clear_all_cache</title>
<programlisting role="php">
<![CDATA[
<?php
// clear the entire cache
$smarty->clear_all_cache();
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,32 +1,36 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.assign">
<title>clear_assign</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>clear_assign</function></funcdef>
<paramdef>string <parameter>var</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.clear.assign">
<refnamediv>
<refname>clear_assign</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_assign</methodname>
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<para>
This clears the value of an assigned variable. This
can be a single value, or an array of values.
</para>
<example>
<title>clear_assign</title>
<programlisting role="php">
<example>
<title>clear_assign</title>
<programlisting role="php">
<![CDATA[
<?php
// clear a single variable
$smarty->clear_assign("Name");
// clear multiple variables
$smarty->clear_assign(array("Name","Address","Zip"));
$smarty->clear_assign(array("Name", "Address", "Zip"));
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,40 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.cache">
<title>clear_cache</title>
<refentry id="api.clear.cache">
<refnamediv>
<refname>clear_cache</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_cache</methodname>
<methodparam choice="opt"><type>string</type><parameter>template</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>cache id</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>compile id</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire time</parameter></methodparam>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>cache_id</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>compile_id</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire_time</parameter></methodparam>
</methodsynopsis>
<para>
This clears the cache for a specific template. If you have
multiple caches for this template, you can clear a specific
cache by supplying the cache id as the second parameter. You
can also pass a compile id as a third parameter. You can "group"
templates together so they can be removed as a group. See the
This clears the cache for a specific <parameter>template</parameter>.
If you have multiple caches for this template, you can clear a specific
cache by supplying the <parameter>cache_id</parameter> as the second
parameter.
You can also pass a <parameter>compile_id</parameter> as a third parameter.
You can "group" templates together so they can be removed as a group. See the
<link linkend="caching">caching section</link> for more
information. As an optional fourth parameter, you can supply a
minimum age in seconds the cache file must be before it will
get cleared.
</para>
<example>
<title>clear_cache</title>
<programlisting role="php">
<example>
<title>clear_cache</title>
<programlisting role="php">
<![CDATA[
<?php
// clear the cache for a template
$smarty->clear_cache("index.tpl");
// clear the cache for a particular cache id in an multiple-cache template
$smarty->clear_cache("index.tpl","CACHEID");
$smarty->clear_cache("index.tpl", "CACHEID");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.compiled.tpl">
<title>clear_compiled_tpl</title>
<refentry id="api.clear.compiled.tpl">
<refnamediv>
<refname>clear_compiled_tpl</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_compiled_tpl</methodname>
<methodparam choice="opt"><type>string</type><parameter>tpl_file</parameter></methodparam>
@@ -17,9 +22,9 @@
default all compiled templates are cleared regardless of their age.
This function is for advanced use only, not normally needed.
</para>
<example>
<title>clear_compiled_tpl</title>
<programlisting role="php">
<example>
<title>clear_compiled_tpl</title>
<programlisting role="php">
<![CDATA[
<?php
// clear a specific template resource
@@ -29,9 +34,10 @@ $smarty->clear_compiled_tpl("index.tpl");
$smarty->clear_compiled_tpl();
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.clear.config">
<title>clear_config</title>
<refentry id="api.clear.config">
<refnamediv>
<refname>clear_config</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>clear_config</methodname>
<methodparam choice="opt"><type>string</type><parameter>var</parameter></methodparam>
@@ -10,9 +15,9 @@
This clears all assigned config variables. If a variable name is
supplied, only that variable is cleared.
</para>
<example>
<title>clear_config</title>
<programlisting role="php">
<example>
<title>clear_config</title>
<programlisting role="php">
<![CDATA[
<?php
// clear all assigned config variables.
@@ -22,9 +27,10 @@ $smarty->clear_config();
$smarty->clear_config('foobar');
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,15 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.config.load">
<title>config_load</title>
<refentry id="api.config.load">
<refnamediv>
<refname>config_load</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>config_load</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>section</parameter></methodparam>
</methodsynopsis>
<para>
This loads config file data and assigns it to the template. This
works identical to the template <link
This loads config <parameter>file</parameter> data and assigns it to
the template. This works identical to the template <link
linkend="language.function.config.load">config_load</link>
function.
</para>
@@ -24,21 +29,22 @@
linkend="variable.compile.check">compile_check</link> settings.
</para>
</note>
<example>
<title>config_load</title>
<programlisting role="php">
<example>
<title>config_load</title>
<programlisting role="php">
<![CDATA[
<?php
// load config variables and assign them
$smarty->config_load('my.conf');
// load a section
$smarty->config_load('my.conf','foobar');
$smarty->config_load('my.conf', 'foobar');
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.display">
<title>display</title>
<refentry id="api.display">
<refnamediv>
<refname>display</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>display</methodname>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
@@ -23,13 +28,12 @@
use more than one $template_dir but only one $compile_dir. Set
a separate compile_id for each $template_dir, otherwise
templates of the same name will overwrite each other. You can
also set the <link
linkend="variable.compile.id">$compile_id</link> variable once
instead of passing this to each call to display().
also set the <link linkend="variable.compile.id">$compile_id</link>
variable once instead of passing this to each call to display().
</para>
<example>
<title>display</title>
<programlisting role="php">
<example>
<title>display</title>
<programlisting role="php">
<![CDATA[
<?php
include("Smarty.class.php");
@@ -37,8 +41,7 @@ $smarty = new Smarty;
$smarty->caching = true;
// only do db calls if cache doesn't exist
if(!$smarty->is_cached("index.tpl"))
{
if(!$smarty->is_cached("index.tpl")) {
// dummy up some data
$address = "245 N 50th";
@@ -58,16 +61,16 @@ if(!$smarty->is_cached("index.tpl"))
$smarty->display("index.tpl");
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
<para>
Use the syntax for <link
linkend="template.resources">template resources</link> to
display files outside of the $template_dir directory.
</para>
<example>
<title>function display template resource examples</title>
<programlisting role="php">
<example>
<title>function display template resource examples</title>
<programlisting role="php">
<![CDATA[
<?php
// absolute filepath
@@ -83,10 +86,10 @@ $smarty->display("file:C:/www/pub/templates/header.tpl");
$smarty->display("db:header.tpl");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.fetch">
<title>fetch</title>
<refentry id="api.fetch">
<refnamediv>
<refname>fetch</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>string</type><methodname>fetch</methodname>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
@@ -28,9 +33,10 @@
linkend="variable.compile.id">$compile_id</link> variable once
instead of passing this to each call to fetch().
</para>
<example>
<title>fetch</title>
<programlisting role="php">
<para>
<example>
<title>fetch</title>
<programlisting role="php">
<![CDATA[
<?php
include("Smarty.class.php");
@@ -39,8 +45,7 @@ $smarty = new Smarty;
$smarty->caching = true;
// only do db calls if cache doesn't exist
if(!$smarty->is_cached("index.tpl"))
{
if(!$smarty->is_cached("index.tpl")) {
// dummy up some data
$address = "245 N 50th";
@@ -64,9 +69,11 @@ $output = $smarty->fetch("index.tpl");
echo $output;
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.get.config.vars">
<title>get_config_vars</title>
<refentry id="api.get.config.vars">
<refnamediv>
<refname>get_config_vars</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>array</type><methodname>get_config_vars</methodname>
<methodparam choice="opt"><type>string</type><parameter>varname</parameter></methodparam>
@@ -10,9 +15,9 @@
This returns the given loaded config variable value. If no parameter
is given, an array of all loaded config variables is returned.
</para>
<example>
<title>get_config_vars</title>
<programlisting role="php">
<example>
<title>get_config_vars</title>
<programlisting role="php">
<![CDATA[
<?php
// get loaded config template var 'foo'
@@ -25,9 +30,10 @@ $config_vars = $smarty->get_config_vars();
print_r($config_vars);
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.get.registered.object">
<title>get_registered_object</title>
<funcsynopsis>
<funcprototype>
<funcdef>array <function>get_registered_object</function></funcdef>
<paramdef>string <parameter>object_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.get.registered.object">
<refnamediv>
<refname>get_registered_object</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>array</type><methodname>get_registered_object</methodname>
<methodparam><type>string</type><parameter>object_name</parameter></methodparam>
</methodsynopsis>
<para>
This returns a reference to a registered object. This is useful
from within a custom function when you need direct access to a
registered object.
</para>
<example>
<title>get_registered_object</title>
<programlisting role="php">
<example>
<title>get_registered_object</title>
<programlisting role="php">
<![CDATA[
<?php
function smarty_block_foo($params, &$smarty) {
function smarty_block_foo($params, &$smarty)
{
if (isset($params['object'])) {
// get reference to registered object
$obj_ref = &$smarty->get_registered_object($params['object']);
@@ -27,9 +31,10 @@ function smarty_block_foo($params, &$smarty) {
}
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.get.template.vars">
<title>get_template_vars</title>
<refentry id="api.get.template.vars">
<refnamediv>
<refname>get_template_vars</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>array</type><methodname>get_template_vars</methodname>
<methodparam choice="opt"><type>string</type><parameter>varname</parameter></methodparam>
@@ -10,9 +15,9 @@
This returns the given assigned variable value. If no parameter
is given, an array of all assigned variables is returned.
</para>
<example>
<title>get_template_vars</title>
<programlisting role="php">
<example>
<title>get_template_vars</title>
<programlisting role="php">
<![CDATA[
<?php
// get assigned template var 'foo'
@@ -25,9 +30,10 @@ $tpl_vars = $smarty->get_template_vars();
print_r($tpl_vars);
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,56 +1,60 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.is.cached">
<title>is_cached</title>
<funcsynopsis>
<funcprototype>
<funcdef>boolean <function>is_cached</function></funcdef>
<paramdef>string <parameter>template</parameter></paramdef>
<paramdef>[string <parameter>cache_id</parameter>]</paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.is.cached">
<refnamediv>
<refname>is_cached</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>bool</type><methodname>is_cached</methodname>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>cache_id</parameter></methodparam>
</methodsynopsis>
<para>
This returns true if there is a valid cache for this template.
This returns &true; if there is a valid cache for this template.
This only works if <link
linkend="variable.caching">caching</link> is set to true.
</para>
<example>
<title>is_cached</title>
<programlisting role="php">
<example>
<title>is_cached</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl")) {
// do database calls, assign vars here
// do database calls, assign vars here
}
$smarty->display("index.tpl");
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
<para>
You can also pass a cache id as an optional second parameter
in case you want multiple caches for the given template.
</para>
<example>
<title>is_cached with multiple-cache template</title>
<programlisting role="php">
<example>
<title>is_cached with multiple-cache template</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->caching = true;
if(!$smarty->is_cached("index.tpl","FrontPage")) {
if(!$smarty->is_cached("index.tpl", "FrontPage")) {
// do database calls, assign vars here
}
$smarty->display("index.tpl","FrontPage");
$smarty->display("index.tpl", "FrontPage");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,23 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.load.filter">
<title>load_filter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>load_filter</function></funcdef>
<paramdef>string <parameter>type</parameter></paramdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.load.filter">
<refnamediv>
<refname>load_filter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>load_filter</methodname>
<methodparam><type>string</type><parameter>type</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
This function can be used to load a filter plugin. The first
argument specifies the type of the filter to load and can be one
of the following: 'pre', 'post', or 'output'. The second argument
specifies the name of the filter plugin, for example, 'trim'.
</para>
<example>
<title>loading filter plugins</title>
<programlisting role="php">
<example>
<title>loading filter plugins</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->load_filter('pre', 'trim'); // load prefilter named 'trim'
@@ -25,9 +28,10 @@ $smarty->load_filter('pre', 'datefooter'); // load another prefilter named 'date
$smarty->load_filter('output', 'compress'); // load output filter named 'compress'
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,22 +1,24 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.block">
<title>register_block</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_block</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
<paramdef>mixed <parameter>impl</parameter></paramdef>
<paramdef>bool <parameter>cacheable</parameter></paramdef>
<paramdef>array or null <parameter>cache_attrs</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.block">
<refnamediv>
<refname>register_block</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_block</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>impl</parameter></methodparam>
<methodparam><type>bool</type><parameter>cacheable</parameter></methodparam>
<methodparam><type>mixed</type><parameter>cache_attrs</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register block functions plugins.
Pass in the block function name, followed by the PHP
function callback that implements it.
</para>
<para>
The php-function callback <parameter>impl</parameter> can be either (a) a string
containing the function name or (b) an array of the form
@@ -30,16 +32,20 @@
class.
</para>
<para>
<parameter>$cacheable</parameter> and <parameter>$cache_attrs</parameter> can be omitted in most cases. See <link linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link> on how to use them properly.
<parameter>cacheable</parameter> and <parameter>cache_attrs</parameter>
can be omitted in most cases. See <link
linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link>
on how to use them properly.
</para>
<example>
<title>register_block</title>
<programlisting role="php">
<example>
<title>register_block</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->register_block("translate", "do_translation");
function do_translation ($params, $content, &$smarty, &$repeat) {
function do_translation ($params, $content, &$smarty, &$repeat)
{
if (isset($content)) {
$lang = $params['lang'];
// do some translation with $content
@@ -50,12 +56,13 @@ function do_translation ($params, $content, &$smarty, &$repeat) {
{* template *}
{translate lang="br"}
Hello, world!
Hello, world!
{/translate}
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,15 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.compiler.function">
<title>register_compiler_function</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_compiler_function</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
<paramdef>mixed <parameter>impl</parameter></paramdef>
<paramdef>bool <parameter>cacheable</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.compiler.function">
<refnamediv>
<refname>register_compiler_function</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>bool</type><methodname>register_compiler_function</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>impl</parameter></methodparam>
<methodparam><type>bool</type><parameter>cacheable</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register a compiler function plugin.
Pass in the compiler function name, followed by the PHP
@@ -28,11 +31,12 @@
class.
</para>
<para>
<parameter>$cacheable</parameter> can be omitted in
<parameter>cacheable</parameter> can be omitted in
most cases. See <link linkend="caching.cacheable">Controlling
Cacheability of Plugins' Output</link> on how to it properly.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,16 +1,19 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.function">
<title>register_function</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_function</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
<paramdef>mixed <parameter>impl</parameter></paramdef>
<paramdef>bool <parameter>cacheable</parameter></paramdef>
<paramdef>array or null <parameter>cache_attrs</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.function">
<refnamediv>
<refname>register_function</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_function</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>impl</parameter></methodparam>
<methodparam><type>bool</type><parameter>cacheable</parameter></methodparam>
<methodparam><type>mixed</type><parameter>cache_attrs</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register template function plugins.
Pass in the template function name, followed by the PHP
@@ -29,30 +32,36 @@
class.
</para>
<para>
<parameter>$cacheable</parameter> and <parameter>$cache_attrs</parameter> can be omitted in most cases. See <link linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link> on how to use them properly.
<parameter>cacheable</parameter> and <parameter>cache_attrs</parameter> can be
omitted in most cases. See <link
linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link>
on how to use them properly.
</para>
<example>
<title>register_function</title>
<programlisting role="php">
<example>
<title>register_function</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->register_function("date_now", "print_current_date");
function print_current_date ($params) {
if(empty($params['format']))
function print_current_date($params)
{
if(empty($params['format'])) {
$format = "%b %e, %Y";
else
} else {
$format = $params['format'];
return strftime($format,time());
}
}
// now you can use this in Smarty to print the current date: {date_now}
// or, {date_now format="%Y/%m/%d"} to format it.
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.modifier">
<title>register_modifier</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_modifier</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
<paramdef>mixed <parameter>impl</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.modifier">
<refnamediv>
<refname>register_modifier</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_modifier</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>impl</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register modifier plugin. Pass in the
template modifier name, followed by the PHP function that it
@@ -26,22 +29,22 @@
<literal>$method</literal> being a class method of that
class.
</para>
<example>
<title>register_modifier</title>
<programlisting role="php">
<example>
<title>register_modifier</title>
<programlisting role="php">
<![CDATA[
<?php
// let's map PHP's stripslashes function to a Smarty modifier.
$smarty->register_modifier("sslash","stripslashes");
$smarty->register_modifier("sslash", "stripslashes");
// now you can use {$var|sslash} to strip slashes from variables
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,23 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.object">
<title>register_object</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_object</function></funcdef>
<paramdef>string <parameter>object_name</parameter></paramdef>
<paramdef>object <parameter>$object</parameter></paramdef>
<paramdef>array <parameter>allowed methods/properties</parameter></paramdef>
<paramdef>boolean <parameter>format</parameter></paramdef>
<paramdef>array <parameter>block methods</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.object">
<refnamediv>
<refname>register_object</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_object</methodname>
<methodparam><type>string</type><parameter>object_name</parameter></methodparam>
<methodparam><type>object</type><parameter>object</parameter></methodparam>
<methodparam><type>array</type><parameter>allowed_methods_properties</parameter></methodparam>
<methodparam><type>boolean</type><parameter>format</parameter></methodparam>
<methodparam><type>array</type><parameter>block_methods</parameter></methodparam>
</methodsynopsis>
<para>
This is to register an object for use in the templates. See the
<link linkend="advanced.features.objects">object section</link>
of the manual for examples.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.outputfilter">
<title>register_outputfilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_outputfilter</function></funcdef>
<paramdef>mixed <parameter>function</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.outputfilter">
<refnamediv>
<refname>register_outputfilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_outputfilter</methodname>
<methodparam><type>mixed</type><parameter>function</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register outputfilters to operate on
a template's output before it is displayed. See
@@ -27,7 +30,8 @@
<literal>$method</literal> being a class method of that
class.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.postfilter">
<title>register_postfilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_postfilter</function></funcdef>
<paramdef>mixed <parameter>function</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.postfilter">
<refnamediv>
<refname>register_postfilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_postfilter</methodname>
<methodparam><type>mixed</type><parameter>function</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register postfilters to run templates
through after they are compiled. See <link
@@ -26,7 +29,8 @@
<literal>$method</literal> being a class method of that
class.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.prefilter">
<title>register_prefilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_prefilter</function></funcdef>
<paramdef>mixed <parameter>function</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.prefilter">
<refnamediv>
<refname>register_prefilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_prefilter</methodname>
<methodparam><type>mixed</type><parameter>function</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register prefilters to run templates
through before they are compiled. See <link
@@ -26,7 +29,8 @@
<literal>$method</literal> being a class method of that
class.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.register.resource">
<title>register_resource</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>register_resource</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
<paramdef>array <parameter>resource_funcs</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.register.resource">
<refnamediv>
<refname>register_resource</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>register_resource</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter>resource_funcs</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically register a resource plugin with Smarty.
Pass in the name of the resource and the array of PHP functions
@@ -36,20 +39,21 @@
to be the method names implementing "source", "timestamp",
"secure" and "trusted".
</para>
<example>
<title>register_resource</title>
<programlisting role="php">
<example>
<title>register_resource</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->register_resource("db", array("db_get_template",
"db_get_timestamp",
"db_get_secure",
"db_get_trusted"));
"db_get_timestamp",
"db_get_secure",
"db_get_trusted"));
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,19 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.template.exists">
<title>template_exists</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>template_exists</function></funcdef>
<paramdef>string <parameter>template</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.template.exists">
<refnamediv>
<refname>template_exists</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>bool</type><methodname>template_exists</methodname>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
</methodsynopsis>
<para>
This function checks whether the specified template exists. It can
accept either a path to the template on the filesystem or a
resource string specifying the template.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,21 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.trigger.error">
<title>trigger_error</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>trigger_error</function></funcdef>
<paramdef>string <parameter>error_msg</parameter></paramdef>
<paramdef>[int <parameter>level</parameter>]</paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.trigger.error">
<refnamediv>
<refname>trigger_error</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>trigger_error</methodname>
<methodparam><type>string</type><parameter>error_msg</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam>
</methodsynopsis>
<para>
This function can be used to output an error message using Smarty.
<parameter>level</parameter> parameter can be one of the values
used for trigger_error() PHP function, i.e. E_USER_NOTICE,
E_USER_WARNING, etc. By default it's E_USER_WARNING.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.block">
<title>unregister_block</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_block</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.block">
<refnamediv>
<refname>unregister_block</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_block</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister block function plugin.
Pass in the block function name.
Pass in the block function <parameter>name</parameter>.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.compiler.function">
<title>unregister_compiler_function</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_compiler_function</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.compiler.function">
<refnamediv>
<refname>unregister_compiler_function</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_compiler_function</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister a compiler function. Pass in
the name of the compiler function.
the <parameter>name</parameter> of the compiler function.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.function">
<title>unregister_function</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_function</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.function">
<refnamediv>
<refname>unregister_function</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_function</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister template function plugin.
Pass in the template function name.
</para>
<example>
<title>unregister_function</title>
<programlisting role="php">
<example>
<title>unregister_function</title>
<programlisting role="php">
<![CDATA[
<?php
// we don't want template designers to have access to system files
@@ -22,9 +25,10 @@
$smarty->unregister_function("fetch");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.modifier">
<title>unregister_modifier</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_modifier</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.modifier">
<refnamediv>
<refname>unregister_modifier</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_modifier</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister modifier plugin. Pass in the
template modifier name.
</para>
<example>
<title>unregister_modifier</title>
<programlisting role="php">
<example>
<title>unregister_modifier</title>
<programlisting role="php">
<![CDATA[
<?php
// we don't want template designers to strip tags from elements
@@ -22,9 +25,10 @@
$smarty->unregister_modifier("strip_tags");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.object">
<title>unregister_object</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_object</function></funcdef>
<paramdef>string <parameter>object_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.object">
<refnamediv>
<refname>unregister_object</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_object</methodname>
<methodparam><type>string</type><parameter>object_name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to unregister an object.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.outputfilter">
<title>unregister_outputfilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_outputfilter</function></funcdef>
<paramdef>string <parameter>function_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.outputfilter">
<refnamediv>
<refname>unregister_outputfilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_outputfilter</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister an output filter.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.postfilter">
<title>unregister_postfilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_postfilter</function></funcdef>
<paramdef>string <parameter>function_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.postfilter">
<refnamediv>
<refname>unregister_postfilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_postfilter</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister a postfilter.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.prefilter">
<title>unregister_prefilter</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_prefilter</function></funcdef>
<paramdef>string <parameter>function_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.prefilter">
<refnamediv>
<refname>unregister_prefilter</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_prefilter</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister a prefilter.
</para>
</sect1>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View File

@@ -1,28 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="api.unregister.resource">
<title>unregister_resource</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>unregister_resource</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<refentry id="api.unregister.resource">
<refnamediv>
<refname>unregister_resource</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsect1>
<title />
<methodsynopsis>
<type>void</type><methodname>unregister_resource</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Use this to dynamically unregister a resource plugin. Pass in the
name of the resource.
</para>
<example>
<title>unregister_resource</title>
<programlisting role="php">
<example>
<title>unregister_resource</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->unregister_resource("db");
?>
]]>
</programlisting>
</example>
</sect1>
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml