Php/docs/class.reflectionproperty

提供:Dev Guides
< Php
移動先:案内検索

(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

/* メソッド */

final private __clone ( ) : void

public __construct ( mixed $class , string $name )

public static export ( mixed $class , string $name [, bool $return ] ) : string

public getDefaultValue ( ) : mixed

public getDocComment ( ) : string

public getModifiers ( ) : int

public getName ( ) : string

public getType ( ) : ReflectionType|null

public getValue ([ object $object ] ) : mixed

public hasDefaultValue ( ) : bool

public hasType ( ) : bool

public isDefault ( ) : bool

public isInitialized ([ object $object ] ) : 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 プロパティを示します。


目次