\PhalApi_Model
Model Class
- provides database interface based on "Table Data Entrance"
- provides base operations base on primary key(eg. id), and should translate the CLOB filed ext_data
- in order to support multi tables, implemetation sub-class should use related table name by config
Usage:
class Model_User extends PhalApi_Model_NotORM {
protected function getTableName($id) {
return 'user';
}
}
$model = new Model_User();
// retrieve
$rs = $model->get($userId);
// insert
$model->insert(array('name' => 'whatever', 'from' => 'somewhere'));
// update
$model->update(1, array('name' => 'dogstar huang'));
// delete
$model->delete(1);
Summary
No protected methods found