Files
smarty/docs/ru/programmers/api-functions/api-register-compiler-function.xml
2008-01-22 21:04:44 +00:00

61 lines
2.5 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 1.2 Maintainer: tony2001 Status: ready -->
<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>
Используется для динамической регистрации плагина функции компилятора.
Передается наименование функции компилятора, далее имя функции, реализующей ее.
</para>
<para>
Коллбек-функцией php <parameter>impl</parameter> может быть (a) строка,
содержащая имя функции, или (b) массив вида
<literal>array(&amp;$object, $method)</literal>, где
<literal>&amp;$object</literal> является ссылкой на
объект, а <literal>$method</literal> является строкой,
содержащей имя метода, или (c) массив в форме
<literal>array($class, $method)</literal>, где
<literal>$class</literal> является именем класса, а
<literal>$method</literal> является методом этого
класса.
</para>
<para>
<parameter>cacheable</parameter> и <parameter>cache_attrs</parameter>
в большинстве случаев могут быть опущены. Смотрите <link
linkend="caching.cacheable">Управление кэшированием результатов работы плагинов</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
-->