PHP Class LeanMapper\Reflection\Property

Author: Vojtěch Kohout
Mostra file Open project: tharos/leanmapper Class Usage Examples

Public Methods

Method Description
__construct ( string $name, EntityReflection $entityReflection, string | null $column, PropertyType $type, boolean $isWritable, boolean $isNullable, boolean $containsCollection, boolean $hasDefaultValue, mixed | null $defaultValue = null, HasOne | HasMany | LeanMapper\Relationship\BelongsToOne | LeanMapper\Relationship\BelongsToMany | null $relationship = null, PropertyMethods $propertyMethods = null, PropertyFilters $propertyFilters = null, PropertyPasses $propertyPasses = null, PropertyValuesEnum $propertyValuesEnum = null, array $customFlags = [] )
containsCollection ( ) : boolean Tells whether property is assumed to contain collection
containsEnumeration ( ) : boolean Tells whether property contains enumeration
getColumn ( ) : string | null Gets name of column holding low-level value
getCustomFlagValue ( string $name ) : string Gets value of requested custom flag
getDefaultValue ( ) : mixed | null Gets default value of property (as defined in annotation)
getEnumValues ( ) : array Gets possible enumeration values
getFilters ( integer $index ) : array | null Gets property filters
getFiltersTargetedArgs ( integer $index ) : array | null Gets filters arguments hard-coded in annotation
getGetter ( ) : string | null Gets getter method
getGetterPass ( ) : string | null Gets getter pass
getName ( ) : string Gets property name
getRelationship ( ) : LeanMapper\Relationship\BelongsToMany | LeanMapper\Relationship\BelongsToOne | HasMany | HasOne | null Returns relationship that property represents
getSetter ( ) : string | null Gets setter method
getSetterPass ( ) : string | null Gets setter pass
getType ( ) : string Gets property type
hasCustomFlag ( string $name ) : boolean Tells whether property has custom flag
hasDefaultValue ( ) : boolean Tells whether property has default value (defined in annotation)
hasRelationship ( ) : boolean Tells whether property represents relationship
isBasicType ( ) : boolean Tells whether property type is basic type (boolean|integer|float|string|array)
isNullable ( ) : boolean Tells whether property can be null
isValueFromEnum ( mixed $value ) : boolean Tells wheter given value is from enumeration
isWritable ( ) : boolean Tells whether property is writable

Private Methods

Method Description
checkContainsEnumeration ( )

Method Details

__construct() public method

public __construct ( string $name, EntityReflection $entityReflection, string | null $column, PropertyType $type, boolean $isWritable, boolean $isNullable, boolean $containsCollection, boolean $hasDefaultValue, mixed | null $defaultValue = null, HasOne | HasMany | LeanMapper\Relationship\BelongsToOne | LeanMapper\Relationship\BelongsToMany | null $relationship = null, PropertyMethods $propertyMethods = null, PropertyFilters $propertyFilters = null, PropertyPasses $propertyPasses = null, PropertyValuesEnum $propertyValuesEnum = null, array $customFlags = [] )
$name string
$entityReflection EntityReflection
$column string | null
$type PropertyType
$isWritable boolean
$isNullable boolean
$containsCollection boolean
$hasDefaultValue boolean
$defaultValue mixed | null
$relationship LeanMapper\Relationship\HasOne | LeanMapper\Relationship\HasMany | LeanMapper\Relationship\BelongsToOne | LeanMapper\Relationship\BelongsToMany | null
$propertyMethods PropertyMethods
$propertyFilters PropertyFilters
$propertyPasses PropertyPasses
$propertyValuesEnum PropertyValuesEnum
$customFlags array

containsCollection() public method

Tells whether property is assumed to contain collection
public containsCollection ( ) : boolean
return boolean

containsEnumeration() public method

Tells whether property contains enumeration
public containsEnumeration ( ) : boolean
return boolean

getColumn() public method

Gets name of column holding low-level value
public getColumn ( ) : string | null
return string | null

getCustomFlagValue() public method

Gets value of requested custom flag
public getCustomFlagValue ( string $name ) : string
$name string
return string

getDefaultValue() public method

Gets default value of property (as defined in annotation)
public getDefaultValue ( ) : mixed | null
return mixed | null

getEnumValues() public method

Gets possible enumeration values
public getEnumValues ( ) : array
return array

getFilters() public method

Gets property filters
public getFilters ( integer $index ) : array | null
$index integer
return array | null

getFiltersTargetedArgs() public method

Gets filters arguments hard-coded in annotation
public getFiltersTargetedArgs ( integer $index ) : array | null
$index integer
return array | null

getGetter() public method

Gets getter method
public getGetter ( ) : string | null
return string | null

getGetterPass() public method

Gets getter pass
public getGetterPass ( ) : string | null
return string | null

getName() public method

Gets property name
public getName ( ) : string
return string

getRelationship() public method

Returns relationship that property represents
public getRelationship ( ) : LeanMapper\Relationship\BelongsToMany | LeanMapper\Relationship\BelongsToOne | HasMany | HasOne | null
return LeanMapper\Relationship\BelongsToMany | LeanMapper\Relationship\BelongsToOne | LeanMapper\Relationship\HasMany | LeanMapper\Relationship\HasOne | null

getSetter() public method

Gets setter method
public getSetter ( ) : string | null
return string | null

getSetterPass() public method

Gets setter pass
public getSetterPass ( ) : string | null
return string | null

getType() public method

Gets property type
public getType ( ) : string
return string

hasCustomFlag() public method

Tells whether property has custom flag
public hasCustomFlag ( string $name ) : boolean
$name string
return boolean

hasDefaultValue() public method

Tells whether property has default value (defined in annotation)
public hasDefaultValue ( ) : boolean
return boolean

hasRelationship() public method

Tells whether property represents relationship
public hasRelationship ( ) : boolean
return boolean

isBasicType() public method

Tells whether property type is basic type (boolean|integer|float|string|array)
public isBasicType ( ) : boolean
return boolean

isNullable() public method

Tells whether property can be null
public isNullable ( ) : boolean
return boolean

isValueFromEnum() public method

Tells wheter given value is from enumeration
public isValueFromEnum ( mixed $value ) : boolean
$value mixed
return boolean

isWritable() public method

Tells whether property is writable
public isWritable ( ) : boolean
return boolean