PHP. Руководство по PHP. 2005
runkit_method_add

runkit_method_add
(no version information, might be only in CVS)runkit_method_add -- Dynamically adds a new method to a given class
Описание
bool runkit_method_add (string classname, string methodname, string args, string code [, int flags])Внимание |
Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск. |
Список параметров
- classname
-
The class to which this method will be added
- methodname
-
The name of the method to add
- args
-
Comma-delimited list of arguments for the newly-created method
- code
-
The code to be evaluated when methodname is called
- flags
-
The type of method to create, can be RUNKIT_ACC_PUBLIC, RUNKIT_ACC_PROTECTED or RUNKIT_ACC_PRIVATE
Замечание: This parameter is only used as of PHP 5, because, prior to this, all methods were public.
Возвращаемые значения
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Примеры
Смотрите также
runkit_method_copy() |
runkit_method_redefine() |
runkit_method_remove() |
runkit_method_rename() |
runkit_function_add() |

![]() | ||
|
Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.
⇪