So doing something like the following would be ok?
Please be forgiving, if I totally missed the point, but practically I'm new to this stuff And my english isn't really making the whole thing easier
abstract class TableDataGatewayBase
protected $_hasOne = array();
* The array has a structure like:
* array('authors' => 'author')
protected $_hasMany = array();
protected $_belongsTo = array();
/** CRUD operations **/
public function create($row);
public function read($pk);
public function update($row);
public function delete($pk);
public function hasMany($what)
if(!$this->_hasMany[$what] instanceof TableDataGatewayBase)
$this->_hasMany[$what] = Finder::findForParent($what, $this->getId()); // probably bad naming, sth like findBelongingTo would be better?