jDaoRecordBase
in package
Base class for all record classes generated by the dao compiler
Tags
Table of Contents
- ERROR_BAD_FORMAT = 3
- ERROR_BAD_TYPE = 2
- ERROR_MAXLENGTH = 4
- ERROR_MINLENGTH = 5
- ERROR_REQUIRED = 1
- $__dao_profile : mixed
- check() : array<string|int, mixed>|false
- check values in the properties of the record, according on the dao definition
- getDbProfile() : string
- getPk() : mixed
- return the value of fields corresponding to the primary key
- getPrimaryKeyNames() : array<string|int, string>
- getProperties() : array<string|int, mixed>
- getSelector() : string
- save() : int
- save the record
- setDbProfile() : mixed
- Sets the jDb profile used to retrieve the record
- setPk() : mixed
- set values on the properties which correspond to the primary key of the record This method accept a single or many values as parameter
Constants
ERROR_BAD_FORMAT
public
mixed
ERROR_BAD_FORMAT
= 3
ERROR_BAD_TYPE
public
mixed
ERROR_BAD_TYPE
= 2
ERROR_MAXLENGTH
public
mixed
ERROR_MAXLENGTH
= 4
ERROR_MINLENGTH
public
mixed
ERROR_MINLENGTH
= 5
ERROR_REQUIRED
public
mixed
ERROR_REQUIRED
= 1
Properties
$__dao_profile
protected
mixed
$__dao_profile
= ''
Methods
check()
check values in the properties of the record, according on the dao definition
public
check() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false —list of errors or false if ok
getDbProfile()
public
getDbProfile() : string
Tags
Return values
string —the jDb profile used to retrieve the record
getPk()
return the value of fields corresponding to the primary key
public
getPk() : mixed
Tags
Return values
mixed —the value or an array of values if there is several pk
getPrimaryKeyNames()
public
abstract getPrimaryKeyNames() : array<string|int, string>
Tags
Return values
array<string|int, string> —list of properties name which contains primary keys
getProperties()
public
abstract getProperties() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —informations on all properties
getSelector()
public
abstract getSelector() : string
Return values
string —the dao selector
save()
save the record
public
save() : int
Tags
Return values
int —1 if success (the number of affected rows). False if the query has failed.
setDbProfile()
Sets the jDb profile used to retrieve the record
public
setDbProfile(string $profile) : mixed
Do not use. Used only by jDao.
Parameters
- $profile : string
Tags
Return values
mixed —setPk()
set values on the properties which correspond to the primary key of the record This method accept a single or many values as parameter
public
setPk() : mixed