ReflectionProperty クラス

(PHP 5, PHP 7)

はじめに

ReflectionProperty クラスは クラスのプロパティについての情報を報告します。

クラス概要

ReflectionProperty implements Reflector {
/* 定数 */
const int IS_STATIC = 1 ;
const int IS_PUBLIC = 256 ;
const int IS_PROTECTED = 512 ;
const int IS_PRIVATE = 1024 ;
/* プロパティ */
public $name ;
public $class ;
/* メソッド */
public __construct ( object|string $class , string $property )
final private __clone ( ) : void
public static export ( mixed $class , string $name , bool $return = ? ) : string
public getDefaultValue ( ) : mixed
public getDocComment ( ) : string|false
public getModifiers ( ) : int
public getName ( ) : string
public getType ( ) : ReflectionType|null
public getValue ( object|null $object = null ) : mixed
public hasDefaultValue ( ) : bool
public hasType ( ) : bool
public isDefault ( ) : bool
public isInitialized ( object|null $object = null ) : bool
public isPrivate ( ) : bool
public isProtected ( ) : bool
public isPublic ( ) : bool
public isStatic ( ) : bool
public setAccessible ( bool $accessible ) : void
public setValue ( object $object , mixed $value ) : void
public __toString ( ) : string
}

プロパティ

name

プロパティ名。読み込み専用で、書き込もうとすると ReflectionException をスローします。

class

プロパティが定義されているクラス名。読み込み専用で、書き込もうとすると ReflectionException をスローします。

定義済み定数

ReflectionProperty の修飾子

ReflectionProperty::IS_STATIC

static プロパティを示します。

ReflectionProperty::IS_PUBLIC

public プロパティを示します。

ReflectionProperty::IS_PROTECTED

protected プロパティを示します。

ReflectionProperty::IS_PRIVATE

private プロパティを示します。

目次