2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 06:41:36 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.classkit-method-rename" xmlns="http://docbook.org/ns/docbook">
|
2004-08-22 17:05:41 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>classkit_method_rename</refname>
|
|
|
|
<refpurpose>Dynamically changes the name of the given method</refpurpose>
|
|
|
|
</refnamediv>
|
2005-02-06 02:59:23 +00:00
|
|
|
<refsect1 role="description">
|
2004-08-22 17:05:41 +00:00
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>classkit_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.classkit.selfmanipulation;
|
|
|
|
&warn.experimental.func;
|
|
|
|
</refsect1>
|
2005-02-06 02:59:23 +00:00
|
|
|
<refsect1 role="parameters">
|
2004-08-22 17:05:41 +00:00
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<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>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2005-02-06 02:59:23 +00:00
|
|
|
<refsect1 role="returnvalues">
|
2004-08-22 17:05:41 +00:00
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
&return.success;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<!-- No changelog: it's only in PECL. -->
|
2005-02-06 02:59:23 +00:00
|
|
|
<refsect1 role="examples">
|
2004-08-22 17:05:41 +00:00
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>classkit_method_rename</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
class Example {
|
|
|
|
function foo() {
|
|
|
|
return "foo!\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Rename the 'foo' method to 'bar'
|
|
|
|
classkit_method_rename(
|
|
|
|
'Example',
|
|
|
|
'foo',
|
|
|
|
'bar'
|
|
|
|
);
|
|
|
|
|
|
|
|
// output renamed function
|
2004-09-03 15:57:23 +00:00
|
|
|
echo Example::bar();
|
2004-08-22 17:05:41 +00:00
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
&example.outputs;
|
|
|
|
<screen>
|
|
|
|
<![CDATA[
|
|
|
|
foo!
|
|
|
|
]]>
|
|
|
|
</screen>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2005-02-06 02:59:23 +00:00
|
|
|
<refsect1 role="seealso">
|
2004-08-22 17:05:41 +00:00
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
2005-02-06 02:59:23 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>classkit_method_add</function></member>
|
|
|
|
<member><function>classkit_method_copy</function></member>
|
|
|
|
<member><function>classkit_method_redefine</function></member>
|
|
|
|
<member><function>classkit_method_remove</function></member>
|
|
|
|
</simplelist>
|
2004-08-22 17:05:41 +00:00
|
|
|
</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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2004-08-22 17:05:41 +00:00
|
|
|
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
|
|
|
|
-->
|