mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-26 18:01:36 +01:00
63 lines
2.1 KiB
XML
63 lines
2.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<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>
|
|
Si può usare questa funzione per registrare dinamicamente
|
|
una funzione plugin di compilazione. Dovete fornire il nome della
|
|
funzione di compilazione, seguito dalla funzione PHP da richiamare
|
|
che la implementa.
|
|
</para>
|
|
<para>
|
|
Il parametro <parameter>impl</parameter>, contenente la funzione
|
|
callback, può avere uno dei seguenti valori: (a) una stringa
|
|
contenente il nome della funzione (b) un array nella forma
|
|
<literal>array(&$oggetto, $metodo)</literal>, dove
|
|
<literal>&$oggetto</literal> è il riferimento ad un
|
|
oggetto e <literal>$metodo</literal> è una stringa contenente
|
|
il nome di un metodo (c) un array nella forma
|
|
<literal>array(&$classe, $metodo)</literal> dove
|
|
<literal>$classe</literal> è un nome di classe e
|
|
<literal>$metodo</literal> è un metodo statico della
|
|
classe.
|
|
</para>
|
|
<para>
|
|
<parameter>cacheable</parameter> può essere omesso
|
|
nella maggioranza dei casi. Consultate <link
|
|
linkend="caching.cacheable">Controllo della Cache per l'output dei Plugins</link>
|
|
per capire come usarlo.
|
|
</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
|
|
-->
|