mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-30 04:42:24 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@273254 c90b9560-bf6c-de11-be94-00142212c4b1
108 lines
3.0 KiB
XML
108 lines
3.0 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.9 $ -->
|
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xml:id="function.override-function" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>override_function</refname>
|
|
<refpurpose>Surcharge les fonctions intégrées</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>override_function</methodname>
|
|
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>function_args</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>function_code</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>override_function</function> surcharge les fonctions intégrées
|
|
(les remplace dans la table des symboles).
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>function_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La fonction à surcharger.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>function_args</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Les arguments de la fonction, séparés par une virgule.
|
|
</para>
|
|
<para>
|
|
Habituellement, vous voudriez passer ce paramètre, tout comme le paramètre
|
|
<parameter>function_code</parameter>, délimité par un guillemet simple.
|
|
La raison pour laquelle on utilise un guillemet simple est pour protéger le
|
|
nom de la variable lors de l'analyse, sinon, si vous utilisez des guillemets doubles,
|
|
il devient nécessaire d'échapper le nom de la variable, e.g.
|
|
\<varname>$votre_variable</varname>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>function_code</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le nouveau code pour la fonction.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>override_function</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
override_function('test', '$a,$b', 'echo "DOING TEST"; return $a * $b;');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
--> |