mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

Reviewed in https://github.com/php/doc-en/pull/26 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349198 c90b9560-bf6c-de11-be94-00142212c4b1
125 lines
2.9 KiB
XML
125 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="function.runkit7-method-rename" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>runkit7_method_rename</refname>
|
|
<refpurpose>Dynamically changes the name of the given method</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>runkit7_method_rename</methodname>
|
|
<methodparam><type>string</type><parameter>classname</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>methodname</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>newname</parameter></methodparam>
|
|
</methodsynopsis>
|
|
¬e.runkit.selfmanipulation;
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>classname</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The class in which to rename the method
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>methodname</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The name of the method to rename
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>newname</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The new name to give to the renamed method
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>runkit7_method_rename</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
class Example {
|
|
function foo() {
|
|
return "foo!\n";
|
|
}
|
|
}
|
|
|
|
// Rename the 'foo' method to 'bar'
|
|
runkit7_method_rename(
|
|
'Example',
|
|
'foo',
|
|
'bar'
|
|
);
|
|
|
|
// output renamed function
|
|
echo Example::bar();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
foo!
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>runkit7_method_add</function></member>
|
|
<member><function>runkit7_method_copy</function></member>
|
|
<member><function>runkit7_method_redefine</function></member>
|
|
<member><function>runkit7_method_remove</function></member>
|
|
<member><function>runkit7_function_rename</function></member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|