@@ -51,35 +51,35 @@ |
||
51 | 51 | */ |
52 | 52 | public function runScaffolding(array $aOptions = array()) |
53 | 53 | { |
54 | - if (!isset($aOptions['p'])) { $aOptions['p'] = 'Batch'; } |
|
54 | + if (!isset($aOptions['p'])) { $aOptions['p'] = 'Batch'; } |
|
55 | 55 | |
56 | - if (!isset($aOptions['b'])) { $aOptions['b'] = json_encode(Config::get('Db', $aOptions['p'])); } |
|
56 | + if (!isset($aOptions['b'])) { $aOptions['b'] = json_encode(Config::get('Db', $aOptions['p'])); } |
|
57 | 57 | |
58 | - $aOptions['g'] = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$aOptions['p'].DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Entity'.DIRECTORY_SEPARATOR; |
|
59 | - $aOptions['h'] = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$aOptions['p'].DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Model'.DIRECTORY_SEPARATOR; |
|
60 | - if (!defined('ENTITY_NAMESPACE')) { define('ENTITY_NAMESPACE', '\Venus\src\\'.$aOptions['p'].'\Entity'); } |
|
58 | + $aOptions['g'] = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$aOptions['p'].DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Entity'.DIRECTORY_SEPARATOR; |
|
59 | + $aOptions['h'] = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.$aOptions['p'].DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'Model'.DIRECTORY_SEPARATOR; |
|
60 | + if (!defined('ENTITY_NAMESPACE')) { define('ENTITY_NAMESPACE', '\Venus\src\\'.$aOptions['p'].'\Entity'); } |
|
61 | 61 | |
62 | - if (!defined('MODEL_NAMESPACE')) { define('MODEL_NAMESPACE', '\Venus\src\\'.$aOptions['p'].'\Model'); } |
|
62 | + if (!defined('MODEL_NAMESPACE')) { define('MODEL_NAMESPACE', '\Venus\src\\'.$aOptions['p'].'\Model'); } |
|
63 | 63 | |
64 | - $oBatch = new BatchEntity; |
|
65 | - $oBatch->runScaffolding($aOptions); |
|
64 | + $oBatch = new BatchEntity; |
|
65 | + $oBatch->runScaffolding($aOptions); |
|
66 | 66 | } |
67 | 67 | |
68 | - /** |
|
69 | - * run the batch to create entity |
|
70 | - * @tutorial bin/console scaffolding |
|
71 | - * |
|
72 | - * @access public |
|
73 | - * @param array $aOptions options of script |
|
74 | - * @return void |
|
75 | - */ |
|
76 | - public function createDb(array $aOptions = array()) |
|
77 | - { |
|
78 | - if (!isset($aOptions['p'])) { $aOptions['p'] = 'Batch'; } |
|
68 | + /** |
|
69 | + * run the batch to create entity |
|
70 | + * @tutorial bin/console scaffolding |
|
71 | + * |
|
72 | + * @access public |
|
73 | + * @param array $aOptions options of script |
|
74 | + * @return void |
|
75 | + */ |
|
76 | + public function createDb(array $aOptions = array()) |
|
77 | + { |
|
78 | + if (!isset($aOptions['p'])) { $aOptions['p'] = 'Batch'; } |
|
79 | 79 | |
80 | - if (!isset($aOptions['b'])) { $aOptions['b'] = json_encode(Config::get('Db', $aOptions['p'])); } |
|
80 | + if (!isset($aOptions['b'])) { $aOptions['b'] = json_encode(Config::get('Db', $aOptions['p'])); } |
|
81 | 81 | |
82 | - $oBatch = new Operation; |
|
83 | - $oBatch->createDb($aOptions); |
|
84 | - } |
|
82 | + $oBatch = new Operation; |
|
83 | + $oBatch->createDb($aOptions); |
|
84 | + } |
|
85 | 85 | } |