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