RecordHistory
extends Model
in package
implements
IEncrypted
Uses
TEncrypted
Abstract class representing database model from which all other models that are not a list inherit from.
Tags
Table of Contents
Interfaces
Properties
- $framework_class_names : array<string|int, mixed>
- $id : string|int|null
- $record : string
- $record_id : string
- $table_name : string
- $user_id : string
- $datetime_created : DateTime
- $dsn_name : string
- The name of the data source name to use in reading, writing and performing database operations on this model. This property essentially descibes where data for instances of this model is stored. By default it is null which indicates that the data for the model is stored, or should be stored in the default database source /data source.
- $marshall_field_exemptions : array<string|int, mixed>
- $model_instance : IModel
- $candidate_id : string
- A type 5 UUID representing the id that would be used to insert a new record for this model if it were to be saved. If this model is one that has been instantiated from an existing database record then this property will be null
- $hashCode : int
- $hashCounter : int
- $list_class : string
- $model_type : string
- $read_state : array<string|int, mixed>
- An array of key value pairs which represent the state of the record/object when it was last read from the data source
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- __toString() : string
- Retrieves a string representation of this object
- addMarshallFieldExemption() : void
- Adds a field that should be extempted when this object is marshalled
- applyFieldValues() : Model
- delete() : Model
- Does a hard deleted on the database record this instance represents
- extends() : bool
- getCandidateId() : string|null
- getDatetimeCreated() : DateTime
- getDSNName() : string|null
- getEncryptedColumns() : array<string|int, mixed>
- Gets an array of column names from the table the model points to that are or are to be encrypted
- getId() : string|int|null
- getMarshallFieldExemptions() : array<string|int, mixed>
- Gets the fields that are exempted when object is marshalled
- getModelType() : string
- getReflection() : ReflectionClass
- getRootBaseClass() : ReflectionClass
- getTable() : ITable
- isEncryptedColumn() : bool
- marshall() : mixed
- postModelManagerPut() : IModel
- Called after the instance has been put into the model manager
- purge() : IModel
- save() : IModel
- init() : mixed
- postInit() : Model
- postInitialSave() : IModel
- postSave() : IModel
- postSourceDataWrite() : IModel
- Called after data from the database has been written to this model
- preInitialSave() : IModel
- preSave() : IModel
- setDSNName() : IModel
- sourceDataWrite() : IModel
- Writes data from the data source to this instance
- getCalledClassSchema() : ISchema
- getListClass() : string
- getSchema() : ISchema
- saveAsHistory() : IModel
- setModelInstance() : RecordHistory
- update() : IModel
Properties
$framework_class_names
public
static array<string|int, mixed>
$framework_class_names
= ['FlightAwareApiCall', 'RecordHistory', 'Skin', 'SkinDomain', 'Timezone']
$id
public
string|int|null
$id
$record
public
string
$record
$record_id
public
string
$record_id
$table_name
public
string
$table_name
$user_id
public
string
$user_id
$datetime_created
protected
DateTime
$datetime_created
$dsn_name
The name of the data source name to use in reading, writing and performing database operations on this model. This property essentially descibes where data for instances of this model is stored. By default it is null which indicates that the data for the model is stored, or should be stored in the default database source /data source.
protected
string
$dsn_name
$marshall_field_exemptions
protected
array<string|int, mixed>
$marshall_field_exemptions
= []
$model_instance
protected
IModel
$model_instance
$candidate_id
A type 5 UUID representing the id that would be used to insert a new record for this model if it were to be saved. If this model is one that has been instantiated from an existing database record then this property will be null
private
string
$candidate_id
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
$list_class
private
static string
$list_class
$model_type
private
string
$model_type
$read_state
An array of key value pairs which represent the state of the record/object when it was last read from the data source
private
array<string|int, mixed>
$read_state
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct([IModel $model_instance = null ]) : mixed
Parameters
- $model_instance : IModel = null
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
__toString()
Retrieves a string representation of this object
public
__toString() : string
Return values
string —$id
addMarshallFieldExemption()
Adds a field that should be extempted when this object is marshalled
public
addMarshallFieldExemption(string $field) : void
Parameters
- $field : string
applyFieldValues()
public
applyFieldValues(array<string|int, mixed> $data[, array<string|int, mixed> $exceptions = array() ]) : Model
Parameters
- $data : array<string|int, mixed>
- $exceptions : array<string|int, mixed> = array()
Return values
Modeldelete()
Does a hard deleted on the database record this instance represents
public
delete() : Model
Return values
Model —A reference to this instance
extends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetCandidateId()
public
getCandidateId() : string|null
Return values
string|nullgetDatetimeCreated()
public
getDatetimeCreated() : DateTime
Tags
Return values
DateTimegetDSNName()
public
getDSNName() : string|null
Return values
string|nullgetEncryptedColumns()
Gets an array of column names from the table the model points to that are or are to be encrypted
public
getEncryptedColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>getId()
public
getId() : string|int|null
Tags
Return values
string|int|nullgetMarshallFieldExemptions()
Gets the fields that are exempted when object is marshalled
public
getMarshallFieldExemptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of fields that are exempted when the object is marshalled
getModelType()
public
getModelType() : string
Tags
Return values
stringgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassgetRootBaseClass()
public
getRootBaseClass() : ReflectionClass
Return values
ReflectionClassgetTable()
public
getTable() : ITable
Tags
Return values
ITableisEncryptedColumn()
public
isEncryptedColumn(IColumn $column) : bool
Parameters
- $column : IColumn
Tags
Return values
boolmarshall()
public
marshall() : mixed
Tags
postModelManagerPut()
Called after the instance has been put into the model manager
public
postModelManagerPut() : IModel
Return values
IModelpurge()
public
purge() : IModel
Return values
IModelsave()
public
save() : IModel
Tags
Return values
IModelinit()
protected
init() : mixed
postInit()
protected
postInit() : Model
Tags
Return values
ModelpostInitialSave()
protected
postInitialSave() : IModel
Tags
Return values
IModelpostSave()
protected
postSave() : IModel
Tags
Return values
IModelpostSourceDataWrite()
Called after data from the database has been written to this model
protected
postSourceDataWrite() : IModel
Return values
IModelpreInitialSave()
protected
preInitialSave() : IModel
Tags
Return values
IModelpreSave()
protected
preSave() : IModel
Tags
Return values
IModelsetDSNName()
protected
setDSNName(string $dsn_name) : IModel
Parameters
- $dsn_name : string
Tags
Return values
IModelsourceDataWrite()
Writes data from the data source to this instance
protected
sourceDataWrite(array<string|int, mixed> $data) : IModel
Parameters
- $data : array<string|int, mixed>
-
The data to write to this instance
Return values
IModel —A reference to this instance
getCalledClassSchema()
private
static getCalledClassSchema() : ISchema
Return values
ISchemagetListClass()
private
getListClass() : string
Tags
Return values
stringgetSchema()
private
getSchema() : ISchema
Return values
ISchemasaveAsHistory()
private
saveAsHistory() : IModel
Return values
IModelsetModelInstance()
private
setModelInstance(IModel $model_instance) : RecordHistory
Parameters
- $model_instance : IModel
Return values
RecordHistoryupdate()
private
update() : IModel