(PECL classkit >= 0.1)
classkit_method_remove — Dynamically removes the given method
Bilginize: This function cannot be used to manipulate the currently running (or chained) method.
Bu işlev DENEYSELDİR. Bu işlevin davranışı, ismi ve belgeleri PHP'nin sonraki sürümlerinde hiçbir duyuru yapılmaksızın değiştirilebilir. Bu riski göze alamayacaksanız bu işlevi kullanmayın.
The class in which to remove the method
The name of the method to remove
Başarı durumunda TRUE, aksi takdirde FALSE döndürür.
Örnek 1 classkit_method_remove() example
<?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'));
?>
Yukarıdaki örneğin çıktısı:
bar