ReflectionProperty 類
(PHP 5, PHP 7, PHP 8)
簡介
ReflectionProperty 類報告了類的屬性的相關資訊。
類摘要
屬性
- name
-
屬性的名稱。只讀,在嘗試賦值的時候拋出 ReflectionException。
- class
-
定義的屬性所在的類。只讀,在嘗試賦值的時候拋出 ReflectionException。
目錄
- ReflectionProperty::__clone — Clone
- ReflectionProperty::__construct — Construct a ReflectionProperty object
- ReflectionProperty::export — Export
- ReflectionProperty::getAttributes — Gets Attributes
- ReflectionProperty::getDeclaringClass — Gets declaring class
- ReflectionProperty::getDefaultValue — Returns the default value declared for a property
- ReflectionProperty::getDocComment — Gets the property doc comment
- ReflectionProperty::getModifiers — Gets the property modifiers
- ReflectionProperty::getName — Gets property name
- ReflectionProperty::getType — Gets a property's type
- ReflectionProperty::getValue — Gets value
- ReflectionProperty::hasDefaultValue — Checks if property has a default value declared
- ReflectionProperty::hasType — Checks if property has a type
- ReflectionProperty::isDefault — Checks if property is a default property
- ReflectionProperty::isInitialized — Checks whether a property is initialized
- ReflectionProperty::isPrivate — Checks if property is private
- ReflectionProperty::isPromoted — Checks if property is promoted
- ReflectionProperty::isProtected — Checks if property is protected
- ReflectionProperty::isPublic — Checks if property is public
- ReflectionProperty::isReadOnly — 檢查屬性是否為只讀
- ReflectionProperty::isStatic — Checks if property is static
- ReflectionProperty::setAccessible — Set property accessibility
- ReflectionProperty::setValue — Set property value
- ReflectionProperty::__toString — To string