OTS_Row_DAO __construct(
[int|string|null
$id = null]
)
|
|
Handles automatic loading for record.
Handles automatic loading for record.
You can call class constructor with optional parameter which can be either of integer type (then it will be treated as primary key value) or string type (then it will be used as name identifier).
Note: Make sure that you pass $id argument of correct type. This method determinates action which should be taken based on variable type. It means that 1 is primary key value, but '1' is name value.
Parameters:
|
int|string|null |
$id: |
Row ID (or name identifier dependend on child class). |
API Tags:
Information Tags:
| Version: | 0.1.1 |
| Since: | 0.1.1 |
Redefinition of:
- OTS_Base_DAO::__construct()
- Sets database connection handler.
void find(
string
$name
)
|
|
Loads row by it's name.
Loads row by it's name.
Parameters:
|
string |
$name: |
String identifier. |
API Tags:
Information Tags:
| Version: | 0.1.1 |
| Since: | 0.1.1 |
Redefined in descendants as:
Loads row by it's ID.
Loads row by it's ID.
Parameters:
|
int |
$id: |
Integer identifier. |
API Tags:
Information Tags:
| Version: | 0.1.1 |
| Since: | 0.1.1 |
Redefined in descendants as: