File tree Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Original file line number Diff line number Diff line change
1
+ 2012-12-06 Evgeny V. Kokovikhin
2
+ * main/DAOs/GenericDAO.class.php
3
+ meta/builders/AutoDaoBuilder.class.php
4
+ meta/builders/BaseBuilder.class.php:
5
+ dbLink became a property
6
+
1
7
2012-11-25 Alexey S. Denisov
2
8
3
9
* core/Form/Primitives/PrimitiveIdentifier.class.php
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ abstract class GenericDAO extends Singleton implements BaseDAO
18
18
{
19
19
private $ identityMap = array ();
20
20
21
+ protected $ linkName = null ;
22
+
21
23
abstract public function getTable ();
22
24
abstract public function getObjectName ();
23
25
@@ -71,7 +73,7 @@ public function completeObject(Identifiable $object)
71
73
**/
72
74
public function getLinkName ()
73
75
{
74
- return null ;
76
+ return $ this -> linkName ;
75
77
}
76
78
77
79
public function getIdName ()
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ abstract class Auto{$class->getName()}DAO extends {$parentName}
37
37
{
38
38
39
39
EOT ;
40
-
40
+
41
41
$ out .= self ::buildPointers ($ class )."\n} \n" ;
42
42
43
43
return $ out .self ::getHeel ();
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ protected static function buildPointers(MetaClass $class)
24
24
$ out = null ;
25
25
26
26
if (!$ class ->getPattern () instanceof AbstractClassPattern) {
27
+ if ($ source = $ class ->getSourceLink ()) {
28
+ $ out .= <<<EOT
29
+ protected \$linkName = ' {$ source }';
30
+
31
+
32
+ EOT ;
33
+ }
34
+
27
35
if (
28
36
$ class ->getIdentifier ()->getColumnName () !== 'id '
29
37
) {
@@ -78,17 +86,6 @@ public function uncacheLists()
78
86
EOT ;
79
87
}
80
88
81
- if ($ source = $ class ->getSourceLink ()) {
82
- $ out .= <<<EOT
83
-
84
-
85
- public function getLinkName()
86
- {
87
- return ' {$ source }';
88
- }
89
- EOT ;
90
- }
91
-
92
89
return $ out ;
93
90
}
94
91
You can’t perform that action at this time.
0 commit comments