Model
extends Injectable
in package
Manage models generation
Table of Contents
- $camelize : Camelize
- Object to camelize texts
- $constraints : array<string|int, mixed>
- Model constraints
- $uncamelize : Uncamelize
- Object to uncamelize texts
- $utils : Utils
- Object to get models utils
- __construct() : mixed
- Generate model
- getConstraints() : void
- Get table constraints
- getInfos() : void
- Get model fields and array map
- getPrefix() : string
- Get table prefix
Properties
$camelize
Object to camelize texts
private
Camelize
$camelize
$constraints
Model constraints
private
array<string|int, mixed>
$constraints
= []
$uncamelize
Object to uncamelize texts
private
Uncamelize
$uncamelize
$utils
Object to get models utils
private
Utils
$utils
Methods
__construct()
Generate model
public
__construct(string $table) : mixed
Parameters
- $table : string
-
Name of the model
Return values
mixed —getConstraints()
Get table constraints
private
getConstraints(string $table[, null|string &$constraints = '' ]) : void
Parameters
- $table : string
-
Table name
- $constraints : null|string = ''
Return values
void —getInfos()
Get model fields and array map
private
getInfos(string $table[, null|string &$fields = '' ][, null|array<string|int, mixed> &$maps = [] ]) : void
Parameters
- $table : string
- $fields : null|string = ''
- $maps : null|array<string|int, mixed> = []
Return values
void —getPrefix()
Get table prefix
private
getPrefix(string $table) : string
Parameters
- $table : string
-
Table name
Return values
string —Prefix of the table