-
Notifications
You must be signed in to change notification settings - Fork 0
/
Orm.php
51 lines (42 loc) · 1.01 KB
/
Orm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Zsamer Framework
*
* @category Zsamer
* @package Zsamer_Db
* @subpackage Table
* @copyright Copyright (c) 2008 Bolsa de Ideas. Consultor en TIC (http://www.bolsadeideas.cl)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
/**
* Zsamer_Db_Table_Orm
*
* It extends Zend_Db_Table_Abstract class to provide more functionality for ORM
* Object-relational mapping (aka ORM, O/RM, and O/R mapping)
*
* @author Andres Guzman F. <aguzman@bolsadeideas.cl>
*/
/**
* @see Zend_Db_Table_Abstract
*/
require_once 'Zend/Db/Table/Abstract.php';
abstract class Zend_Db_Table_Orm extends Zend_Db_Table_Abstract
{
protected $_rowClass = 'Zend_Db_Table_Row_Orm';
public function findAll()
{
return $this->fetchAll();
}
public function findById($id)
{
return $this->find($id)->current();
}
public function getReferenceMapOrm()
{
return $this->_referenceMap;
}
public function getReferenceMapOrmKey()
{
return array_keys($this->_referenceMap);
}
}