企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` ReflectionObject extends ReflectionClass implements Reflector { /* 常量 */ const integer IS_IMPLICIT_ABSTRACT = 16;//指示了类是一个抽象类(abstract), 因为它有抽象(abstract)方法 const integer IS_EXPLICIT_ABSTRACT = 32 ;//指示了类是一个抽象类(abstract), 因为它已明确定义。 const integer IS_FINAL = 64 ;//指示这是一个 final 类.//类的名称。只读,并在尝试赋值的时候会抛出 ReflectionException /* 属性 */ public $name ; /* 方法 */ public __construct ( mixed $argument ) //初始化 ReflectionObject 类 public static export ( mixed $argument [, bool $return ] ) : string //导出一个类 /* 继承的方法 */ public getConstant ( string $name ) : mixed //获取定义过的一个常量 public getConstants ( void ) : array//获取一组常量 public getConstructor ( void ) : ReflectionMethod//获取类的构造函数 public getDefaultProperties ( void ) : array //获取默认属性 public getDocComment ( void ) : string //获取文档注释 public getEndLine ( void ) : int //获取最后一行的行数 public getExtension ( void ) : ReflectionExtension //根据已定义的类获取所在扩展的 ReflectionExtension 对象 public getExtensionName ( void ) : string //获取定义的类所在的扩展的名称 public getFileName ( void ) : string //获取定义类的文件名 public getInterfaceNames ( void ) : array //获取接口(interface)名称 public getInterfaces ( void ) : array //获取接口 public getMethod ( string $name ) : ReflectionMethod //获取一个类方法的 ReflectionMethod public getMethods ([ int $filter ] ) : array //获取所有方法组成的数组 public getModifiers ( void ) : int //获取类的修饰符 public getName ( void ) : string //获取类名 public getNamespaceName ( void ) : string //获取命名空间的名称 public getParentClass ( void ) : ReflectionClass //获取父类 public getProperties ([ int $filter ] ) : array //获取一组属性 public getProperty ( string $name ) : ReflectionProperty //获取类的一个属性的 ReflectionProperty public getReflectionConstant ( string $name ) : ReflectionClassConstant //获取类的常量的ReflectionClassConstant public getReflectionConstants ( void ) : array //获取类常量 public getShortName ( void ) : string //获取短名 public getStartLine ( void ) : int //获取起始行号 public getStaticProperties ( void ) : array //获取静态(static)属性 public getStaticPropertyValue ( string $name [, mixed &$def_value ] ) : mixed //获取静态(static)属性的值 public getTraitAliases ( void ) : array //返回 trait 别名的一个数组 public getTraitNames ( void ) : array //返回这个类所使用 traits 的名称的数组 public getTraits ( void ) : array //返回这个类所使用的 traits 数组 public hasConstant ( string $name ) : bool //检查常量是否已经定义 public hasMethod ( string $name ) : bool //检查方法是否已定义 public hasProperty ( string $name ) : bool //检查属性是否已定义 public implementsInterface ( string $interface ) : bool //接口的实现 public inNamespace ( void ) : bool //检查是否位于命名空间中 public isAbstract ( void ) : bool //检查类是否是抽象类(abstract) public isAnonymous ( void ) : bool //检查类是否是匿名类 public isCloneable ( void ) : bool //返回了一个类是否可复制 public isFinal ( void ) : bool //检查类是否声明为 final public isInstance ( object $object ) : bool //检查类的实例 public isInstantiable ( void ) : bool //检查类是否可实例化 public isInterface ( void ) : bool //检查类是否是一个接口(interface) public isInternal ( void ) : bool //检查类是否由扩展或核心在内部定义 public isIterable ( void ) : bool //检查此类是否可迭代 public isIterateable ( void ) : bool //检查是否可迭代(iterateable) public isSubclassOf ( string $class ) : bool //检查是否为一个子类 public isTrait ( void ) : bool //返回了是否为一个 trait public isUserDefined ( void ) : bool //检查是否由用户定义的 public newInstance ( mixed $args [, mixed $... ] ) : object //从指定的参数创建一个新的类实例 public newInstanceArgs ([ array $args ] ) : object //从给出的参数创建一个新的类实例 public newInstanceWithoutConstructor ( void ) : object //创建一个新的类实例而不调用它的构造函数 public setStaticPropertyValue ( string $name , string $value ) : void //设置静态属性的值 public __toString ( void ) : strin //返回 ReflectionClass 对象字符串的表示形式 } ```