array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.runkit7-method-remove.php', 1 => 'runkit7_method_remove', 2 => 'Dynamically removes the given method', ), 'up' => array ( 0 => 'ref.runkit7.php', 1 => 'runkit7 Funktionen', ), 'prev' => array ( 0 => 'function.runkit7-method-redefine.php', 1 => 'runkit7_method_redefine', ), 'next' => array ( 0 => 'function.runkit7-method-rename.php', 1 => 'runkit7_method_rename', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/runkit7/functions/runkit7-method-remove.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

runkit7_method_remove

(PECL runkit7 >= Unknown)

runkit7_method_removeDynamically removes the given method

Beschreibung

runkit7_method_remove(string $class_name, string $method_name): bool

Hinweis: Diese Funktion kann nicht genutzt werden, um die aktuell ausgeführte (oder verkette) Methode zu manipulieren.

Parameter-Liste

class_name

The class in which to remove the method

method_name

The name of the method to remove

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Beispiele

Beispiel #1 runkit7_method_remove() example

<?php
class Example {
function
foo() {
return
"foo!\n";
}

function
bar() {
return
"bar!\n";
}
}

// Remove the 'foo' method
runkit7_method_remove(
'Example',
'foo'
);

echo
implode(' ', get_class_methods('Example'));

?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

bar

Siehe auch