get_class_methods

(PHP 4 , PHP 5)

get_class_methods -- бНГБПЮЫЮЕР ЛЮЯЯХБ ХЛЕМ ЛЕРНДНБ ЙКЮЯЯЮ

нОХЯЮМХЕ

array get_class_methods ( mixed class_name)

тСМЙЖХЪ БНГБПЮЫЮЕР ЛЮЯЯХБ ХЛЕМ ЛЕРНДНБ НОПЕДЕКЕММШУ ДКЪ ЙКЮЯЯЮ class_name.

Замечание: мЮВХМЮЪ Я PHP 4.0.6, БШ ЛНФЕРЕ ОЕПЕДЮРЭ ТСМЙЖХХ НАЗЕЙР БЛЕЯРН СЙЮГЮМХЪ ХЛЕМХ ЙКЮЯЯЮ class_name. й ОПХЛЕПС:

<?php
$class_methods
= get_class_methods($my_class); // МХФЕ ОПХБЕДЕМ ОНКМШИ ОПХЛЕП
?>

Пример 1. оПХЛЕП ХЯОНКЭГНБЮМХЪ get_class_methods()

<?php

class myclass {
    
// ЙНМЯРПСЙРНП
    
function myclass()
    {
        return(
true);
    }
    
    
// ЛЕРНД 1
    
function myfunc1()
    {
        return(
true);
    }

    
// ЛЕРНД 2
    
function myfunc2()
    {
        return(
true);
    }
}

$my_object = new myclass();

$class_methods = get_class_methods(get_class($my_object));

foreach (
$class_methods as $method_name) {
    echo
"$method_name\n";
}

?>

БШБЕДЕР:

myclass
myfunc1
myfunc2

яЛ. РЮЙФЕ get_class_vars() Х get_object_vars().


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ