ReflectionClassConstant クラス ReflectionClassConstant
&reftitle.intro; ReflectionClassConstant クラスは、クラス定数に関する情報を報告します。
&reftitle.classsynopsis; ReflectionClassConstant ReflectionClassConstant Reflector &Constants; public const int ReflectionClassConstant::IS_PUBLIC public const int ReflectionClassConstant::IS_PROTECTED public const int ReflectionClassConstant::IS_PRIVATE public const int ReflectionClassConstant::IS_FINAL &Properties; public string name public string class &Methods;
&reftitle.properties; name クラス定数の名前。読み取り専用です。 書き込もうとすると ReflectionException がスローされます。 class クラス定数が定義されたクラス名。読み取り専用です。 書き込もうとすると ReflectionException がスローされます。
&reftitle.constants;
ReflectionClassConstant の修飾子 ReflectionClassConstant::IS_PUBLIC アクセス権が public であることを示します。 PHP 7.4.0 より前のバージョンでは、この値は 256 でした。 ReflectionClassConstant::IS_PROTECTED アクセス権が protected であることを示します。 PHP 7.4.0 より前のバージョンでは、この値は 512 でした。 ReflectionClassConstant::IS_PRIVATE アクセス権が private であることを示します。 PHP 7.4.0 より前のバージョンでは、この値は 1024 でした。 ReflectionClassConstant::IS_FINAL 定数が final であることを示します。 PHP 8.1.0 以降で利用可能です。 これらの定数の値は、PHP のバージョンが異なると変更される可能性があります。 これらの値を直接用いず、常に定数を使うことを推奨します。
&reference.reflection.entities.reflectionclassconstant;