php-doc-en/reference/classkit/functions/classkit-method-remove.xml
2004-11-08 12:10:21 +00:00

116 lines
2.5 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<refentry id="function.classkit-method-remove">
<refnamediv>
<refname>classkit_method_remove</refname>
<refpurpose>Dynamically removes the given method</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>classkit_method_remove</methodname>
<methodparam><type>string</type><parameter>classname</parameter></methodparam>
<methodparam><type>string</type><parameter>methodname</parameter></methodparam>
</methodsynopsis>
&note.classkit.selfmanipulation;
&warn.experimental.func;
</refsect1>
<refsect1>
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>classname</parameter></term>
<listitem>
<para>
The class in which to remove the method
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>methodname</parameter></term>
<listitem>
<para>
The name of the method to remove
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<!-- No changelog: it's only in PECL. -->
<refsect1>
&reftitle.examples;
<para>
<example>
<title><function>classkit_method_remove</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
class Example {
function foo() {
return "foo!\n";
}
function bar() {
return "bar!\n";
}
}
// Remove the 'foo' method
classkit_method_remove(
'Example',
'foo'
);
echo implode(' ', get_class_methods('Example'));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bar
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>classkit_method_add</function>,
<function>classkit_method_copy</function>,
<function>classkit_method_redefine</function>&listendand;
<function>classkit_method_rename</function>
</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
-->