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'booleanTRUEto allowNULLvalues.
-2string[]Property types from code or from doc comments or empty array.
-3stringPHP code property name.
-4string|NULLDatabase column name (if defined) orNULL.
-5mixedAdditional convertsion data (if defined) orNULL.
-6boolTRUEif column is in primary key.
-7boolTRUEif column has auto increment feature.
-8bool|string|NULLTRUE` 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'booleanTRUEto allowNULLvalues.
-2string[]Property types from code or from doc comments or empty array.
-3stringPHP code property name.
-4string|NULLDatabase column name (if defined) orNULL.
-5mixedAdditional convertsion data (if defined) orNULL.
-6boolTRUEif column is in primary key.
-7boolTRUEif column has auto increment feature.
-8bool|string|NULLTRUE` 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'booleanTRUEto allowNULLvalues.
-2string[]Property types from code or from doc comments or empty array.
-3stringPHP code property name.
-4string|NULLDatabase column name (if defined) orNULL.
-5mixedAdditional convertsion data (if defined) orNULL.
-6boolTRUEif column is in primary key.
-7boolTRUEif column has auto increment feature.
-8bool|string|NULLTRUE` if column is in unique key or name of the unique key in database.
Parameters
- $prop
- $phpWithTypes
- $phpWithUnionTypes
- $toolClass
- $attributesAnotation
Returns
array
|