PHP 클래스 BetterReflection\Reflection\ReflectionProperty

상속: implements Reflector
파일 보기 프로젝트 열기: roave/better-reflection 1 사용 예제들

공개 메소드들

메소드 설명
__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