class Property extends ReflectionProperty (View source)

Represents property, that can be decorated.

Properties

protected string $dataType Property data type.
protected AnnotationManager $annotationManager Annotation manager.

Methods

__construct(ReflectionProperty $property, AnnotationManager $annotation_manager)

Create class instance from reflection property.

string
getDataType()

Determines property data type.

string
getRawDataType()

Returns the raw data type.

boolean
isSimpleDataType()

Determines if property data type isn't class or interface.

boolean
isDataTypeArray()

Determines if property data type is an array.

boolean
isDataTypeCollection()

Determines if property data type is a collection.

IAnnotation[]
getAnnotations(string $annotation_class)

Returns annotation of a property.

IAnnotation[]
getAnnotationsFromPropertyOrClass(string $annotation_class)

Returns annotations defined at property or in class, set in @var annotation of a property.

string
__toString()

Returns string representation of a property.

Expectation
shouldReceive(string $name)

No description

Details

__construct(ReflectionProperty $property, AnnotationManager $annotation_manager)

Create class instance from reflection property.

Parameters

ReflectionProperty $property Reflection property.
AnnotationManager $annotation_manager Annotation manager.

string getDataType()

Determines property data type.

Return Value

string

string getRawDataType()

Returns the raw data type.

Return Value

string

boolean isSimpleDataType()

Determines if property data type isn't class or interface.

Return Value

boolean

boolean isDataTypeArray()

Determines if property data type is an array.

Return Value

boolean

boolean isDataTypeCollection()

Determines if property data type is a collection.

Return Value

boolean

IAnnotation[] getAnnotations(string $annotation_class)

Returns annotation of a property.

Parameters

string $annotation_class Annotation name.

Return Value

IAnnotation[]

IAnnotation[] getAnnotationsFromPropertyOrClass(string $annotation_class)

Returns annotations defined at property or in class, set in @var annotation of a property.

Parameters

string $annotation_class Annotation name.

Return Value

IAnnotation[]

string __toString()

Returns string representation of a property.

Return Value

string

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation