FacturaScripts

ModelTrait

The class from which all models inherit, connects to the database, check the structure of the table and if necessary create or adapt.

Table of Contents

$fields List of fields in the table. array
getModelFields() Returns the list of fields in the table. array
modelClassName() Returns the name of the class of the model. string
modelName() Returns the name of the model. string
loadModelFields() Loads table fields if is necessary. mixed

Properties

$fields

List of fields in the table.

protected static array $fields = []

Methods

getModelFields()

Returns the list of fields in the table.

public getModelFields( ) : array
Return values
array

modelClassName()

Returns the name of the class of the model.

public modelClassName( ) : string
Return values
string

modelName()

Returns the name of the model.

protected modelName( ) : string
Return values
string

loadModelFields()

Loads table fields if is necessary.

protected loadModelFields( &$dataBase : DataBase , $tableName : string ) : mixed
Parameters
$dataBase : DataBase
$tableName : string
Return values
mixed

Search results