PHP Класс BetterReflection\Reflection\ReflectionProperty

Наследование: implements Reflector
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__clone ( )
__toString ( ) : string Return string representation of this little old property.
createFromInstance ( object $instance, string $propertyName ) : BetterReflection\Reflection\ReflectionMethod Create a reflection of an instance's property by it's name
createFromName ( string $className, string $propertyName ) : BetterReflection\Reflection\ReflectionMethod Create a reflection of a class's property by it's name
createFromNode ( BetterReflection\Reflector\Reflector $reflector, Property $node, ReflectionClass $declaringClass, boolean $declaredAtCompileTime = true ) : ReflectionProperty
export ( )
getDeclaringClass ( ) : ReflectionClass
getDefaultValue ( ) : mixed Get the default value of the property (as defined before constructor is called, when the property is defined)
getDocBlockTypeStrings ( ) : string[] Get the DocBlock type hints as an array of strings.
getDocBlockTypes ( ) : phpDocumentor\Reflection\Type[] Get the types defined in the DocBlocks. This returns an array because the parameter may have multiple (compound) types specified (for example when you type hint pipe-separated "string|null", in which case this would return an array of Type objects, one for string, one for null.
getDocComment ( ) : string
getModifiers ( ) : integer Get the core-reflection-compatible modifier values.
getName ( ) : string Get the name of the property.
isDefault ( ) : boolean Has the property been declared at compile-time?
isPrivate ( ) : boolean Is the property private?
isProtected ( ) : boolean Is the property protected?
isPublic ( ) : boolean Is the property public?
isStatic ( ) : boolean Is the property static?
setVisibility ( integer $newVisibility ) Set the default visibility of this property. Use the core \ReflectionProperty::IS_* values as parameters, e.g.:

Приватные методы

Метод Описание
__construct ( )
getVisibilityAsString ( ) : string

Описание методов

__clone() публичный Метод

public __clone ( )

__toString() публичный Метод

Return string representation of this little old property.
public __toString ( ) : string
Результат string

createFromInstance() публичный статический Метод

Create a reflection of an instance's property by it's name
public static createFromInstance ( object $instance, string $propertyName ) : BetterReflection\Reflection\ReflectionMethod
$instance object
$propertyName string
Результат BetterReflection\Reflection\ReflectionMethod

createFromName() публичный статический Метод

Create a reflection of a class's property by it's name
public static createFromName ( string $className, string $propertyName ) : BetterReflection\Reflection\ReflectionMethod
$className string
$propertyName string
Результат BetterReflection\Reflection\ReflectionMethod

createFromNode() публичный статический Метод

public static createFromNode ( BetterReflection\Reflector\Reflector $reflector, Property $node, ReflectionClass $declaringClass, boolean $declaredAtCompileTime = true ) : ReflectionProperty
$reflector BetterReflection\Reflector\Reflector
$node PhpParser\Node\Stmt\Property
$declaringClass ReflectionClass
$declaredAtCompileTime boolean
Результат ReflectionProperty

export() публичный статический Метод

public static export ( )

getDeclaringClass() публичный Метод

public getDeclaringClass ( ) : ReflectionClass
Результат ReflectionClass

getDefaultValue() публичный Метод

Get the default value of the property (as defined before constructor is called, when the property is defined)
public getDefaultValue ( ) : mixed
Результат mixed

getDocBlockTypeStrings() публичный Метод

Get the DocBlock type hints as an array of strings.
public getDocBlockTypeStrings ( ) : string[]
Результат string[]

getDocBlockTypes() публичный Метод

Get the types defined in the DocBlocks. This returns an array because the parameter may have multiple (compound) types specified (for example when you type hint pipe-separated "string|null", in which case this would return an array of Type objects, one for string, one for null.
public getDocBlockTypes ( ) : phpDocumentor\Reflection\Type[]
Результат phpDocumentor\Reflection\Type[]

getDocComment() публичный Метод

public getDocComment ( ) : string
Результат string

getModifiers() публичный Метод

Get the core-reflection-compatible modifier values.
public getModifiers ( ) : integer
Результат integer

getName() публичный Метод

Get the name of the property.
public getName ( ) : string
Результат string

isDefault() публичный Метод

Note that unless the property is static, this is hard coded to return true, because we are unable to reflect instances of classes, therefore we can be sure that all properties are always declared at compile-time.
public isDefault ( ) : boolean
Результат boolean

isPrivate() публичный Метод

Is the property private?
public isPrivate ( ) : boolean
Результат boolean

isProtected() публичный Метод

Is the property protected?
public isProtected ( ) : boolean
Результат boolean

isPublic() публичный Метод

Is the property public?
public isPublic ( ) : boolean
Результат boolean

isStatic() публичный Метод

Is the property static?
public isStatic ( ) : boolean
Результат boolean

setVisibility() публичный Метод

Set the default visibility of this property. Use the core \ReflectionProperty::IS_* values as parameters, e.g.:
public setVisibility ( integer $newVisibility )
$newVisibility integer