Entity __construct(
string
$name, [string
$table_prefix = ''], [string
$col_prefix = ''], [array
$params = NULL], [string
$primary_key = 'id']
)
|
|
Entity constructor
Parameters:
string |
$name: |
Entity name |
string |
$table_prefix: |
Table prefix, e.g. 'cot_' |
string |
$col_prefix: |
SQL column prefix |
array |
$params: |
Table parameters |
string |
$primary_key: |
Primary key field(s) |
API Tags:
Redefinition of:
- Container::__construct()
- Constructs container and puts data inside
Redefined in descendants as:
Adds a new entry to the entity parameter list. After the parameter has been added, you will be able to access it by name in associative array style.
Parameters:
Param |
$param: |
Parameter object to be added (can be Param, Ref or Dict) |
API Tags:
Return: | Reference to the added parameter |
See: | Param, Reference, Dict |
Access: | public |
Redefined in descendants as:
void define(
array
$params, [mixed
$primary_key = 'id']
)
|
|
Defines entity structure all at once
Parameters:
array |
$params: |
Array of Param |
mixed |
$primary_key: |
Primary key name(s) |
API Tags:
Fetches Param used as primary key for the entity
API Tags:
Return: | Primary key parameter |
Access: | public |