reference/runkit7/functions/runkit7-method-remove.xml
917c06eac884740ef9285f59387a3f5259d66722
...
...
@@ -0,0 +1,121 @@
1
+
<?xml version="1.0" encoding="utf-8"?>
2
+
<!-- $Revision$ -->
3
+

4
+
<refentry xml:id="function.runkit7-method-remove" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
+
<refnamediv>
6
+
<refname>runkit7_method_remove</refname>
7
+
<refpurpose>Dynamically removes the given method</refpurpose>
8
+
</refnamediv>
9
+

10
+
<refsect1 role="description">
11
+
&reftitle.description;
12
+
<methodsynopsis>
13
+
<type>bool</type><methodname>runkit7_method_remove</methodname>
14
+
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
15
+
<methodparam><type>string</type><parameter>method_name</parameter></methodparam>
16
+
</methodsynopsis>
17
+
&note.runkit.selfmanipulation;
18
+
</refsect1>
19
+

20
+
<refsect1 role="parameters">
21
+
&reftitle.parameters;
22
+
<variablelist>
23
+
<varlistentry>
24
+
<term><parameter>class_name</parameter></term>
25
+
<listitem>
26
+
<para>
27
+
The class in which to remove the method
28
+
</para>
29
+
</listitem>
30
+
</varlistentry>
31
+
<varlistentry>
32
+
<term><parameter>method_name</parameter></term>
33
+
<listitem>
34
+
<para>
35
+
The name of the method to remove
36
+
</para>
37
+
</listitem>
38
+
</varlistentry>
39
+
</variablelist>
40
+
</refsect1>
41
+

42
+
<refsect1 role="returnvalues">
43
+
&reftitle.returnvalues;
44
+
<para>
45
+
&return.success;
46
+
</para>
47
+
</refsect1>
48
+
<refsect1 role="examples">
49
+
&reftitle.examples;
50
+
<para>
51
+
<example>
52
+
<title><function>runkit7_method_remove</function> example</title>
53
+
<programlisting role="php">
54
+
<![CDATA[
55
+
<?php
56
+
class Example {
57
+
function foo() {
58
+
return "foo!\n";
59
+
}
60
+

61
+
function bar() {
62
+
return "bar!\n";
63
+
}
64
+
}
65
+

66
+
// Remove the 'foo' method
67
+
runkit7_method_remove(
68
+
'Example',
69
+
'foo'
70
+
);
71
+

72
+
echo implode(' ', get_class_methods('Example'));
73
+

74
+
?>
75
+
]]>
76
+
</programlisting>
77
+
&example.outputs;
78
+
<screen>
79
+
<![CDATA[
80
+
bar
81
+
]]>
82
+
</screen>
83
+
</example>
84
+
</para>
85
+
</refsect1>
86
+
<refsect1 role="seealso">
87
+
&reftitle.seealso;
88
+
<para>
89
+
<simplelist>
90
+
<member><function>runkit7_method_add</function></member>
91
+
<member><function>runkit7_method_copy</function></member>
92
+
<member><function>runkit7_method_redefine</function></member>
93
+
<member><function>runkit7_method_rename</function></member>
94
+
<member><function>runkit7_function_remove</function></member>
95
+
</simplelist>
96
+
</para>
97
+
</refsect1>
98
+

99
+

100
+
</refentry>
101
+

102
+
<!-- Keep this comment at the end of the file
103
+
Local variables:
104
+
mode: sgml
105
+
sgml-omittag:t
106
+
sgml-shorttag:t
107
+
sgml-minimize-attributes:nil
108
+
sgml-always-quote-attributes:t
109
+
sgml-indent-step:1
110
+
sgml-indent-data:t
111
+
indent-tabs-mode:nil
112
+
sgml-parent-document:nil
113
+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
114
+
sgml-exposed-tags:nil
115
+
sgml-local-catalogs:nil
116
+
sgml-local-ecat-files:nil
117
+
End:
118
+
vim600: syn=xml fen fdm=syntax fdl=2 si
119
+
vim: et tw=78 syn=sgml
120
+
vi: ts=1 sw=1
121
+
-->
0
122