-
Notifications
You must be signed in to change notification settings - Fork 1
/
gimiMVC
executable file
·97 lines (85 loc) · 2.7 KB
/
gimiMVC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/php
<?php
/**
* gimiMVC executable script file.
*
* @author Z. Alem <[email protected]>
* @link http://alemcode.com
* @copyright Copyright 2012, Z.Alem
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
/**
* GimiMVC is a complimentary console tool for miniMVC.
* It serves to aid in development within the miniMVC framework
* by providing scaffolding tools
* and simplified database access.
*
* SCAFFOLDING
*
* Scaffold templates are placed in minimvc/gimiMVC/templates/.
* Each template folder consists of a template file for each component to be scaffolded.
* ex. template/theManager/model.php generates a model scaffold
*
* Each template file inherits its basic functionality and scheme by
* extension of the Template class.
*
* DATABASE ACCESS
*
* gimiMVC utilizes the QueryTool class, an extension of the QueryBuilder and Database minimvc/db/ classes,
* to provide direct, simplified access to an application's database.
*
* Using the available commands, gimiMVC uses the QueryTool to create a direct query console
* communication-line to an application database, creation and deletion of tables,
* and linking and unlinking of tables.
*
* @author Z. Alem <[email protected]>
* @package minimvc
*/
/**
* ----------------------------------------------------------------------
* Load Required Files
* ----------------------------------------------------------------------
*/
define( 'GIMIMVC_ROOT', dirname(__FILE__) . '/' );
$required_files = array (
'base/Load',
'base/Config',
'components/Adaptable',
'database/Database',
'database/DbQuery',
'database/querybuilder/IQueryBuilder',
'database/querybuilder/QueryBuilder',
'database/querybuilder/adapter/QBAdapter',
'lib/File',
'log/Logger',
'gimimvc/Config',
'gimimvc/Processor',
'gimimvc/core/QueryTool',
'gimimvc/core/Scaffold',
'util/ArrayUtil',
);
foreach ( $required_files as $file )
require_once ( GIMIMVC_ROOT . 'minimvc/' . $file . '.php' );
/**
* ----------------------------------------------------------------------
* Define/Fetch Arguments
* ----------------------------------------------------------------------
*/
$args = getopt(
'c:m:v:p:u:a:q:x::h',
array(
'useconfig:', 'app:', 'mvc:', 'table:',
'undotable:', 'link:', 'unlink:', 'to:',
'user', 'help', 'sql:', 'redo', 'undo',
'scaffold:', 'component:', 'unit:', 'generate',
'readschema:', 'run::',
)
);
/**
* ----------------------------------------------------------------------
* Initiate Processor and process arguements
* ----------------------------------------------------------------------
*/
$processor = new Processor( $args );
$processor -> process ();
?>