mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-01 04:41:37 +01:00
77 lines
2.6 KiB
XML
77 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
|
|
|
<refentry id="api.register.compiler.function">
|
|
<refnamediv>
|
|
<refname>register_compiler_function()</refname>
|
|
<refpurpose>Déclare dynamiquement un plugin de fonction de compilation</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</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>
|
|
Il faut passer en paramètres le nom de la <link linkend="plugins.compiler.functions">fonction
|
|
de compilation</link>, suivi par la fonction PHP qui l'implémente.
|
|
</para>
|
|
<para>
|
|
La fonction PHP <parameter>impl</parameter> peut être soit :
|
|
</para>
|
|
<orderedlist numeration="loweralpha">
|
|
<listitem>
|
|
<para>
|
|
une chaîne de caractères contenant le nom de la fonction
|
|
</para>
|
|
</listitem><listitem>
|
|
<para>
|
|
un tableau de la forme <literal>array(&$object, $method)</literal> où
|
|
<literal>&$object</literal> est une référence à un objet et
|
|
<literal>$method</literal> est le nom de la méthode
|
|
</para>
|
|
</listitem><listitem>
|
|
<para>
|
|
soit (c) un tableau de la forme <literal>array(&$class, $method)</literal> où
|
|
<literal>$class</literal> est le nom de la classe et
|
|
<literal>$method</literal> est une méthode de cette classe.
|
|
</para>
|
|
</listitem>
|
|
</orderedlist>
|
|
<para>
|
|
Le paramètre <parameter>cacheable</parameter> peut être omis dans la
|
|
plupart des cas. Voir <link
|
|
linkend="caching.cacheable">Contrôler la mise en cache des sorties des Plugins</link>
|
|
pour plus d'informations concernant cette utilisation.
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<link linkend="api.unregister.compiler.function">unregister_compiler_function()</link> et
|
|
les <link linkend="plugins.compiler.functions">plugins de fonction de compilation</link>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
--> |