PhpDataTypeSpecTrait uses trait:short
Describe what values are allowed to be stored in this field.
This trait is used to track a PHP-style field which is mapped ot a entity-style field.
Thus, it has both PHP's @var ($type) and entity's @dataType ($dataType).
Tags
Table of Contents
Properties
- $dataType : string
- The type of data stored in this field.
- $dfkEntities : string
- $fkColumn : array<string|int, mixed>
- $fkEntity : string
- $serialize : int
- $type : array<string|int, string>
- The PHP
- $typeAliases : array<string|int, mixed>
- Aliases for the valid data types
Methods
- getDataType() : string
- getDfkEntities() : array<string|int, mixed>|null
- getFkColumn() : string|null
- getFkEntity() : string
- getSerialize() : int
- getType() : array<string|int, string>
- setDataType() : $this
- setDfkEntities() : $this
- setFkColumn() : $this
- setFkEntity() : $this
- setSerialize() : $this
- setType() : $this
- getValidDataTypes() : array<string|int, mixed>
- Add valid types that are not not part of \CRM_Utils_Type::dataTypes
Properties
$dataType
The type of data stored in this field.
public
string
$dataType
Ex: 'Integer', 'Boolean', 'Float', 'String', 'Text', 'Blob'
$dfkEntities
public
string
$dfkEntities
$fkColumn
public
array<string|int, mixed>
$fkColumn
$fkEntity
public
string
$fkEntity
$serialize
public
int
$serialize
Tags
$type
The PHP
public
array<string|int, string>
$type
$typeAliases
Aliases for the valid data types
public
static array<string|int, mixed>
$typeAliases
= ['Int' => 'Integer', 'Link' => 'Url', 'Memo' => 'Text']
Methods
getDataType()
public
getDataType() : string
Return values
stringgetDfkEntities()
public
getDfkEntities() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetFkColumn()
public
getFkColumn() : string|null
Return values
string|nullgetFkEntity()
public
getFkEntity() : string
Return values
stringgetSerialize()
public
getSerialize() : int
Return values
intgetType()
public
getType() : array<string|int, string>
Return values
array<string|int, string>setDataType()
public
setDataType(mixed $dataType) : $this
Parameters
- $dataType : mixed
Tags
Return values
$thissetDfkEntities()
public
setDfkEntities(array<string|int, mixed>|null $dfkEntities) : $this
Parameters
- $dfkEntities : array<string|int, mixed>|null
Return values
$thissetFkColumn()
public
setFkColumn(string $fkColumn) : $this
Parameters
- $fkColumn : string
Return values
$thissetFkEntity()
public
setFkEntity(string $fkEntity) : $this
Parameters
- $fkEntity : string
Return values
$thissetSerialize()
public
setSerialize(int|string|null $serialize) : $this
Parameters
- $serialize : int|string|null
Return values
$thissetType()
public
setType(string|array<string|int, string> $type) : $this
Parameters
- $type : string|array<string|int, string>
Tags
Return values
$thisgetValidDataTypes()
Add valid types that are not not part of \CRM_Utils_Type::dataTypes
protected
getValidDataTypes() : array<string|int, mixed>