瀏覽代碼

generate.php

tags/0.1.0
Robin Thoni 9 年之前
父節點
當前提交
2a3f6cf0b0
共有 3 個檔案被更改,包括 62 行新增3 行删除
  1. 3
    0
      .gitignore
  2. 14
    3
      composer.json
  3. 45
    0
      generate.php

+ 3
- 0
.gitignore 查看文件

@@ -1 +1,4 @@
1 1
 /.idea
2
+/vendor
3
+/composer.lock
4
+/.env

+ 14
- 3
composer.json 查看文件

@@ -7,13 +7,24 @@
7 7
             "email": "robin@rthoni.com"
8 8
         }
9 9
     ],
10
+    "repositories": [{
11
+      "type": "vcs",
12
+      "url":  "https://git.rthoni.com/luticate/utils.git"
13
+    },{
14
+      "type": "vcs",
15
+      "url":  "https://git.rthoni.com/luticate/generator.git"
16
+    }],
10 17
     "require": {
11
-      "php": ">=5.5.9",
12
-      "illuminate/database": "5.1.x-dev"
18
+      "laravel/lumen-framework": "5.1.x-dev",
19
+      "luticate/utils": "*"
20
+    },
21
+    "require-dev": {
22
+      "luticate/generator": "*"
13 23
     },
14 24
     "autoload": {
15 25
       "psr-4": {
16 26
         "Luticate\\": "src/"
17 27
       }
18
-    }
28
+    },
29
+    "minimum-stability": "dev"
19 30
 }

+ 45
- 0
generate.php 查看文件

@@ -0,0 +1,45 @@
1
+<?php
2
+/**
3
+ * Created by PhpStorm.
4
+ * User: robin
5
+ * Date: 9/26/15
6
+ * Time: 4:03 PM
7
+ */
8
+
9
+use Luticate\Generator\LuGenerator;
10
+
11
+require_once('vendor/autoload.php');
12
+
13
+Dotenv::load(".");
14
+
15
+$gen = new LuGenerator(getenv("DB_CONNECTION"), getenv("DB_DATABASE"), getenv("DB_HOST"),
16
+    getenv("DB_PORT"), getenv("DB_USERNAME"), getenv("DB_PASSWORD"));
17
+
18
+$gen->setConfig(array("dbo" =>
19
+    array(
20
+        "namespace" => 'Luticate\Auth\DBO',
21
+        "folder" => 'src/Auth/DBO'
22
+    ),
23
+    "models" =>
24
+        array(
25
+            "namespace" => 'Luticate\Auth\DataAccess\Models',
26
+            "folder" => 'src/Auth/DataAccess/Models'
27
+        ),
28
+    "sp" =>
29
+        array(
30
+            "namespace" => 'Luticate\Auth\DataAccess\SP',
31
+            "folder" => 'src/Auth/DataAccess/SP'
32
+        ),
33
+    "dataaccess" =>
34
+        array(
35
+            "namespace" => 'Luticate\Auth\DataAccess',
36
+            "folder" => 'src/Auth/DataAccess'
37
+        ),
38
+    "business" =>
39
+        array(
40
+            "namespace" => 'Luticate\Auth\Business',
41
+            "folder" => 'src/Auth/Business'
42
+        ),
43
+    "mode" => 0775
44
+));
45
+$gen->run();

Loading…
取消
儲存