mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
WS, and switched to methodsynppsis
This commit is contained in:
@@ -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>
|
||||
@@ -45,7 +43,8 @@ $smarty->append_by_ref("Address", $address);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
@@ -51,7 +49,8 @@ $smarty->append(array("city" => "Lincoln","state" => "Nebraska"));
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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.
|
||||
@@ -36,7 +39,8 @@ $smarty->assign_by_ref('Address', $address);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
@@ -33,7 +36,8 @@ $smarty->assign(array("city" => "Lincoln", "state" => "Nebraska"));
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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>
|
||||
@@ -22,7 +25,8 @@ $smarty->clear_all_assign();
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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
|
||||
@@ -24,7 +27,8 @@ $smarty->clear_all_cache();
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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.
|
||||
@@ -26,7 +29,8 @@ $smarty->clear_assign(array("Name","Address","Zip"));
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,20 +1,26 @@
|
||||
<?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
|
||||
@@ -34,7 +40,8 @@ $smarty->clear_cache("index.tpl","CACHEID");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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>
|
||||
@@ -31,7 +36,8 @@ $smarty->clear_compiled_tpl();
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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>
|
||||
@@ -24,7 +29,8 @@ $smarty->clear_config('foobar');
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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>
|
||||
@@ -38,7 +43,8 @@ $smarty->config_load('my.conf','foobar');
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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,9 +28,8 @@
|
||||
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>
|
||||
@@ -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";
|
||||
@@ -85,8 +88,8 @@ $smarty->display("db:header.tpl");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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,6 +33,7 @@
|
||||
linkend="variable.compile.id">$compile_id</link> variable once
|
||||
instead of passing this to each call to fetch().
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>fetch</title>
|
||||
<programlisting role="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";
|
||||
@@ -66,7 +71,9 @@ echo $output;
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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>
|
||||
@@ -27,7 +32,8 @@ print_r($config_vars);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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
|
||||
@@ -18,7 +21,8 @@
|
||||
<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']);
|
||||
@@ -29,7 +33,8 @@ function smarty_block_foo($params, &$smarty) {
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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>
|
||||
@@ -27,7 +32,8 @@ print_r($tpl_vars);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,16 +1,19 @@
|
||||
<?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>
|
||||
@@ -50,7 +53,8 @@ $smarty->display("index.tpl","FrontPage");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,14 +1,17 @@
|
||||
<?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
|
||||
@@ -27,7 +30,8 @@ $smarty->load_filter('output', 'compress'); // load output filter named 'compres
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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,7 +32,10 @@
|
||||
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>
|
||||
@@ -39,7 +44,8 @@
|
||||
<?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
|
||||
@@ -55,7 +61,8 @@ function do_translation ($params, $content, &$smarty, &$repeat) {
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
|
@@ -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,7 +32,10 @@
|
||||
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>
|
||||
@@ -38,13 +44,15 @@
|
||||
<?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.
|
||||
@@ -52,7 +60,8 @@ function print_current_date ($params) {
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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,7 +29,6 @@
|
||||
<literal>$method</literal> being a class method of that
|
||||
class.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>register_modifier</title>
|
||||
<programlisting role="php">
|
||||
@@ -41,7 +43,8 @@ $smarty->register_modifier("sslash","stripslashes");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
@@ -49,7 +52,8 @@ $smarty->register_resource("db", array("db_get_template",
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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.
|
||||
@@ -24,7 +27,8 @@ $smarty->unregister_function("fetch");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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.
|
||||
@@ -24,7 +27,8 @@ $smarty->unregister_modifier("strip_tags");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,13 +1,16 @@
|
||||
<?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.
|
||||
@@ -22,7 +25,8 @@ $smarty->unregister_resource("db");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
Reference in New Issue
Block a user