Files
smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml
2006-09-26 23:29:02 +00:00

59 lines
1.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<refentry id="api.register.compiler.function">
<refnamediv>
<refname>register_compiler_function()</refname>
<refpurpose>dynamically register a compiler function plugin</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>
Pass in the
<link linkend="plugins.compiler.functions">compiler function</link> name,
followed by the PHP function that implements it.
</para>
&api.register.snippet;
<para>
<parameter>cacheable</parameter> can be omitted in
most cases. See <link linkend="caching.cacheable">controlling
cacheability of plugin output</link> on how to use it properly.
</para>
<para>
See also
<link linkend="api.unregister.compiler.function">
<varname>unregister_compiler_function()</varname></link>
and the
<link linkend="plugins.compiler.functions">plugin compiler functions</link> section.
</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
-->