php 之对象工具

原创
2016-06-13 11:31:29 732浏览

class_exists检查类是否已定义,如果类存在返回true

get_class返回对象的类名

get_class_methods返回由类的方法名组成的数组

get_declared_classes返回由已定义类的名字所组成的数组

is_callable检测参数是否为合法的可调用结构

method_exists检查类的方法是否存在

    bool method_exists ( mixed $object , string $method_name )

    检查类的方法是否存在于指定的 object中。

get_class_vars返回由类的默认属性组成的数组(只显示public属性)

    array get_class_vars ( string $class_name )

    返回由类的默认公有属性组成的关联数组,此数组的元素以 varname => value 的形式存在。

get_parent_class返回对象或类的父类名

is_subclass_of如果此对象是该类的子类,则返回 TRUE

call_user_funcCall the callback given by the first parameter

call_user_func_arrayCall a callback with an array of parameters

flectionClass 类报告了一个类的有关信息。

Reflection::exportExports

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。