|
|
classkit_method_copy (PECL) classkit_method_copy -- Copies a method from class to another Описаниеbool classkit_method_copy ( string dClass, string dMethod, string sClass [, string sMethod] ) | Внимание |
Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ.
Поведение этой функции, ее имя и относящаяся к ней документация
могут измениться в последующих версиях PHP без уведомления.
Используйте эту функцию на свой страх и риск. |
Список параметров
dClass
Destination class for copied method
dMethod
Destination method name
sClass
Source class of the method to copy
sMethod
Name of the method to copy from the source class. If this parameter is
omitted, the value of dMethod is assumed.
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Примеры
Пример 1. classkit_method_copy() example |
<?php
class Foo {
function example() {
return "foo!\n";
}
}
class Bar {
}
classkit_method_copy('Bar', 'baz', 'Foo', 'example');
echo Bar::baz();
?>
|
Результат выполнения данного примера: |
add a note
User Contributed Notes
classkit_method_copy
There are no user contributed notes for this page.
|