CakeFest 2024: The Official CakePHP Conference

ReflectionExtension::__construct

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::__constructReflectionExtension を作成する

説明

public ReflectionExtension::__construct(string $name)

ReflectionExtension オブジェクトを作成します。

パラメータ

name

拡張モジュールの名前。

エラー / 例外

リフレクションする拡張機能が存在しない場合、 ReflectionException がスローされます。

例1 ReflectionExtension の例

<?php
$ext
= new ReflectionExtension('Reflection');

printf('Extension: %s (version: %s)', $ext->getName(), $ext->getVersion());
?>

上の例の出力は、 たとえば以下のようになります。

Extension: Reflection (version: $Revision$)

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top