« ReflectionClassConstant::__toString
ReflectionConstant::__construct »
PHP Manual
リフレクション
ReflectionConstant クラス
ReflectionConstant クラス
(PHP 8 >= 8.4.0)
はじめに
ReflectionConstant
クラスは、グローバル定数に関する情報を報告します。
クラス概要
final
class
ReflectionConstant
implements
Reflector
{
/* プロパティ */
public
string
$
name
;
/* メソッド */
public
__construct
(
string
$name
)
public
getExtension
():
?
ReflectionExtension
public
getExtensionName
():
string
|
false
public
getFileName
():
string
|
false
public
getName
():
string
public
getNamespaceName
():
string
public
getShortName
():
string
public
getValue
():
mixed
public
isDeprecated
():
bool
public
__toString
():
string
}
プロパティ
name
定数の名前。読み取り専用です。 書き込もうとすると
ReflectionException
がスローされます。
参考
ReflectionClassConstant
目次
ReflectionConstant::__construct
— ReflectionConstant を構築する
ReflectionConstant::getExtension
— 定数を定義した拡張モジュールの ReflectionExtension を取得する
ReflectionConstant::getExtensionName
— 定数を定義した拡張モジュールの名前を取得する
ReflectionConstant::getFileName
— 定数を定義したファイル名を取得する
ReflectionConstant::getName
— 定数名を取得する
ReflectionConstant::getNamespaceName
— 名前空間名を取得する
ReflectionConstant::getShortName
— 短い名前を取得する
ReflectionConstant::getValue
— 値を取得する
ReflectionConstant::isDeprecated
— 非推奨かどうかを調べる
ReflectionConstant::__toString
— 文字列表現を返す