JoinModel
extends JoinModel
in package
Class created by Core/Internal/PluginsDeploy
Table of Contents
Properties
- $dataBase : DataBase
- It provides direct access to the database.
- $masterModel : ModelClass
- Master model
Methods
- __construct() : mixed
- Constructor and class initializer.
- __get() : mixed
- Return model view field value
- __isset() : bool
- Check if exits value to property
- __set() : mixed
- Set value to model view field
- all() : array<string|int, static>
- Load data for the indicated where.
- clear() : mixed
- Reset the values of all model properties.
- count() : int
- Returns the number of records that meet the condition.
- delete() : bool
- Remove the model master data from the database.
- exists() : bool
- Returns true if the model data is stored in the database.
- getModelFields() : array<string|int, mixed>
- loadFromCode() : bool
- Fill the class with the registry values whose primary column corresponds to the value $cod, or according to the condition where indicated, if value is not reported in $cod.
- primaryColumnValue() : mixed
- Gets the value from model view cursor of the master model primary key.
- totalSum() : float
- url() : string
- Returns the url where to see / modify the data.
- getFields() : array<string|int, mixed>
- List of fields or columns to select clausule
- getGroupFields() : string
- Return Group By fields
- getSQLFrom() : string
- List of tables related to from clausule
- getTables() : array<string|int, mixed>
- List of tables required for the execution of the view.
- loadFromData() : mixed
- Assign the values of the $data array to the model view properties.
- setMasterModel() : mixed
- Sets the master model for data operations
Properties
$dataBase
It provides direct access to the database.
protected
static DataBase
$dataBase
$masterModel
Master model
protected
ModelClass
$masterModel
Methods
__construct()
Constructor and class initializer.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
__get()
Return model view field value
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
Check if exits value to property
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
Set value to model view field
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
- $value : mixed
all()
Load data for the indicated where.
public
all(array<string|int, DataBaseWhere> $where[, array<string|int, mixed> $order = [] ][, int $offset = 0 ][, int $limit = 0 ]) : array<string|int, static>
Parameters
- $where : array<string|int, DataBaseWhere>
-
filters to apply to model records.
- $order : array<string|int, mixed> = []
-
fields to use in the sorting. For example ['code' => 'ASC']
- $offset : int = 0
- $limit : int = 0
Return values
array<string|int, static>clear()
Reset the values of all model properties.
public
clear() : mixed
count()
Returns the number of records that meet the condition.
public
count([array<string|int, DataBaseWhere> $where = [] ]) : int
Parameters
- $where : array<string|int, DataBaseWhere> = []
-
filters to apply to records.
Return values
intdelete()
Remove the model master data from the database.
public
delete() : bool
Return values
boolexists()
Returns true if the model data is stored in the database.
public
exists() : bool
Return values
boolgetModelFields()
public
getModelFields() : array<string|int, mixed>
Return values
array<string|int, mixed>loadFromCode()
Fill the class with the registry values whose primary column corresponds to the value $cod, or according to the condition where indicated, if value is not reported in $cod.
public
loadFromCode(string $cod[, array<string|int, mixed> $where = [] ][, array<string|int, mixed> $orderby = [] ]) : bool
Initializes the values of the class if there is no record that meet the above conditions. Returns True if the record exists and False otherwise.
Parameters
- $cod : string
- $where : array<string|int, mixed> = []
- $orderby : array<string|int, mixed> = []
Return values
boolprimaryColumnValue()
Gets the value from model view cursor of the master model primary key.
public
primaryColumnValue() : mixed
totalSum()
public
totalSum(string $field[, array<string|int, mixed> $where = [] ]) : float
Parameters
- $field : string
- $where : array<string|int, mixed> = []
Return values
floaturl()
Returns the url where to see / modify the data.
public
url([string $type = 'auto' ][, string $list = 'List' ]) : string
Parameters
- $type : string = 'auto'
- $list : string = 'List'
Return values
stringgetFields()
List of fields or columns to select clausule
protected
abstract getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getGroupFields()
Return Group By fields
protected
getGroupFields() : string
Return values
stringgetSQLFrom()
List of tables related to from clausule
protected
abstract getSQLFrom() : string
Return values
stringgetTables()
List of tables required for the execution of the view.
protected
abstract getTables() : array<string|int, mixed>
Return values
array<string|int, mixed>loadFromData()
Assign the values of the $data array to the model view properties.
protected
loadFromData(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
setMasterModel()
Sets the master model for data operations
protected
setMasterModel(ModelClass $model) : mixed
Parameters
- $model : ModelClass