Trait MetaData
Methods summary
protected static
array
|
#
getMetaData( integer $propsFlags = 0, int[] $additionalMaps = [] )
Return cached data about properties in current class to not create
and parse reflection objects every time. Returned data is always array
list list() indexes into separate variables. First result record is
always metadata array with numeric indexes, where each value is property
metadata. Second and every next result record is properties map, where
keys are property names (or column names) and values are integer keys into
first result record with metadata.
Return cached data about properties in current class to not create
and parse reflection objects every time. Returned data is always array
list list() indexes into separate variables. First result record is
always metadata array with numeric indexes, where each value is property
metadata. Second and every next result record is properties map, where
keys are property names (or column names) and values are integer keys into
first result record with metadata.
Every key in metadata array in first result record is integer key,
which is necessary to complete from any properties map and every value
is array with metadata:
- 0 boolean TRUE for private property.
- 1' boolean TRUEto allow NULLvalues.
- 2 string[]Property types from code or from doc comments or empty array.
- 3 stringPHP code property name.
- 4 string|NULLDatabase column name (if defined) or NULL.
- 5 mixedAdditional convertsion data (if defined) or NULL.
- 6 bool TRUEif column is in primary key.
- 7 bool TRUEif column has auto increment feature.
- 8 bool|string|NULL TRUE` if column is in unique key or name of the unique key in database. private properties manipulation.
Possible reading flags: - \MvcCore\IModel::PROPS_INHERIT - \MvcCore\IModel::PROPS_PRIVATE - \MvcCore\IModel::PROPS_PROTECTED - \MvcCore\IModel::PROPS_PUBLIC
Parameters
- $propsFlags
- $additionalMaps
Returns
array
Throws
RuntimeException|InvalidArgumentException
|
protected static
array
|
#
parseMetaData( string $classFullName, integer $accessModFlags, boolean $inclInherit )
Parse called class metadata with reflection.
Parse called class metadata with reflection.
Parameters
- $classFullName
- $accessModFlags
- $inclInherit
Returns
array
Throws
InvalidArgumentException
|
protected static
array
|
#
parseMetaDataProperty( ReflectionProperty $prop, boolean $phpWithTypes, boolean $phpWithUnionTypes, string $toolClass, boolean $attributesAnotation )
Return array with property metadata:
- 0 boolean TRUE for private property.
- 1' boolean TRUEto allow NULLvalues.
- 2 string[]Property types from code or from doc comments or empty array.
- 3 stringPHP code property name.
- 4 string|NULLDatabase column name (if defined) or NULL.
- 5 mixedAdditional convertsion data (if defined) or NULL.
- 6 bool TRUEif column is in primary key.
- 7 bool TRUEif column has auto increment feature.
- 8 bool|string|NULL TRUE` if column is in unique key or name
of the unique key in database.
Return array with property metadata:
- 0 boolean TRUE for private property.
- 1' boolean TRUEto allow NULLvalues.
- 2 string[]Property types from code or from doc comments or empty array.
- 3 stringPHP code property name.
- 4 string|NULLDatabase column name (if defined) or NULL.
- 5 mixedAdditional convertsion data (if defined) or NULL.
- 6 bool TRUEif column is in primary key.
- 7 bool TRUEif column has auto increment feature.
- 8 bool|string|NULL TRUE` if column is in unique key or name of the unique key in database.
Parameters
- $prop
- $phpWithTypes
- $phpWithUnionTypes
- $toolClass
- $attributesAnotation
Returns
array
|