Rev 29 | Rev 51 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 29 | Rev 49 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | <?php
|
1 | <?php
|
2 | 2 | ||
- | 3 | require_once __DIR__ . '/../AbstractModel.php'; |
|
3 | require_once __DIR__ . '/Table.php'; |
4 | require_once __DIR__ . '/Table.php'; |
4 | 5 | ||
5 | /**
|
6 | /**
|
6 | * Generic abstract database mapper class
|
7 | * Generic abstract database mapper class
|
7 | *
|
8 | *
|
8 | * @author Thomas Lahn
|
9 | * @author Thomas Lahn
|
9 | */
|
10 | */
|
10 | abstract class Mapper |
11 | abstract class Mapper extends AbstractModel |
11 | {
|
12 | {
|
12 | /**
|
13 | /**
|
13 | * Class name of the associated table model
|
14 | * Class name of the associated table model
|
14 | *
|
15 | *
|
15 | * @var string
|
16 | * @var string
|
Line 62... | Line 63... | ||
62 | 63 | ||
63 | return $this->_dbTable; |
64 | return $this->_dbTable; |
64 | }
|
65 | }
|
65 | 66 | ||
66 | /**
|
67 | /**
|
- | 68 | * Returns the <code>Table</code> for this object.
|
|
- | 69 | *
|
|
- | 70 | * @return Table
|
|
- | 71 | */
|
|
- | 72 | public function getTable () |
|
- | 73 | {
|
|
- | 74 | return $this->getDbTable(); |
|
- | 75 | }
|
|
- | 76 | ||
- | 77 | /**
|
|
67 | * Sorts an array of objects by the property of the nested object.
|
78 | * Sorts an array of objects by the property of the nested object.
|
68 | * To be used with the u*sort() functions.
|
79 | * To be used with the u*sort() functions.
|
69 | *
|
80 | *
|
70 | * @param object $a First operand of the comparison
|
81 | * @param object $a First operand of the comparison
|
71 | * @param object $b Second operand of the comparison
|
82 | * @param object $b Second operand of the comparison
|