ReflectionClass
PHP Manual

ReflectionClass::getExtension

(PHP 5)

ReflectionClass::getExtensionGets a ReflectionExtension object for the extension which defined the class

说明

public ReflectionExtension ReflectionClass::getExtension ( void )

Gets a ReflectionExtension object for the extension which defined the class.

参数

此函数没有参数。

返回值

A ReflectionExtension object representing the extension which defined the class, or NULL for user-defined classes.

范例

Example #1 Basic usage of ReflectionClass::getExtension()

<?php
$class 
= new ReflectionClass('ReflectionClass');
$extension $class->getExtension();
var_dump($extension);
?>

以上例程会输出:

object(ReflectionExtension)#2 (1) {
  ["name"]=>
  string(10) "Reflection"
}

参见


ReflectionClass
PHP Manual