Browse Source

fixed generator for utils upgrade

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
e6940594f0
2 changed files with 4 additions and 5 deletions
  1. 2
    2
      src/Generator/business.php.twig
  2. 2
    3
      src/Generator/dataaccess.php.twig

+ 2
- 2
src/Generator/business.php.twig View File

7
 use {{ dbo_namespace.as_it }}\{{ dbo_name.as_it }};
7
 use {{ dbo_namespace.as_it }}\{{ dbo_name.as_it }};
8
 
8
 
9
 class {{ business_name.as_it }} extends LuBusiness {
9
 class {{ business_name.as_it }} extends LuBusiness {
10
-    public function __construct()
10
+    protected static function getDataAccess()
11
     {
11
     {
12
-        $this->dataAccess = new {{ data_access_name.as_it }}();
12
+        return new {{ data_access_name.as_it }}();
13
     }
13
     }
14
 }
14
 }

+ 2
- 3
src/Generator/dataaccess.php.twig View File

7
 use {{ dbo_namespace.as_it }}\{{ dbo_name.as_it }};
7
 use {{ dbo_namespace.as_it }}\{{ dbo_name.as_it }};
8
 
8
 
9
 class {{ data_access_name.as_it }} extends LuDataAccess {
9
 class {{ data_access_name.as_it }} extends LuDataAccess {
10
-    public function __construct()
10
+    protected static function getModel()
11
     {
11
     {
12
-        parent::__construct();
13
-        $this->model = new {{ model_user_name.as_it }}();
12
+        return new {{ model_user_name.as_it }}();
14
     }
13
     }
15
 }
14
 }

Loading…
Cancel
Save