@@ -26,18 +26,10 @@ function appel_cmd($class,$static_method){
2626 //récupération des arguments maitres "--env=????????????? ou --debug-aff=TRUEor????????"
2727 $ i = 0 ;
2828 foreach ($ arguments as $ master_arg ) {
29- if (preg_match ("/--env=([A-Z]*)/ " , $ master_arg , $ matches )) {
29+ /* if (preg_match("/--env=([A-Z]*)/", $master_arg, $matches)) {
3030 define("ENV", $matches[1]);
3131 unset($arguments[$i]);
32- }
33- if (preg_match ("/--debug-aff=([A-Z]*)/ " , $ master_arg , $ matches )) {
34- if ($ matches [1 ] === 'TRUE ' ) {
35- define ("LOG_AFF_ERROR " , true );
36- } else {
37- define ("LOG_AFF_ERROR " , false );
38- }
39- unset($ arguments [$ i ]);
40- }
32+ }*/
4133 $ i ++;
4234 }
4335
@@ -52,11 +44,15 @@ function appel_cmd($class,$static_method){
5244 $ class ::$ static_method ();
5345 }
5446}
47+
48+
49+
50+
5551if (isset ($ argv [1 ])) {
5652 $ option = explode (': ' , $ argv [1 ]);
57- $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . lcfirst ($ option [0 ]) . ".php " ;
53+ $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . ucfirst ($ option [0 ]) . ".php " ;
5854 if (is_file ($ command_file )) {
59- $ class = "MVC \\Command \\" . lcfirst ($ option [0 ]);
55+ $ class = "MVC \\Command \\" . ucfirst ($ option [0 ]);
6056
6157 if (isset ($ option [1 ]) && $ option [1 ] !== '' ) {
6258 $ static_method = $ option [1 ];
@@ -67,9 +63,9 @@ function appel_cmd($class,$static_method){
6763 $ class ::$ static_method ();
6864 }
6965 } else {
70- $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . "app " . DIRECTORY_SEPARATOR . lcfirst ($ option [0 ]) . ".php " ;
66+ $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . "App " . DIRECTORY_SEPARATOR . ucfirst ($ option [0 ]) . ".php " ;
7167 if (is_file ($ command_file )) {
72- $ class = "MVC \\Command \\App \\" . lcfirst ($ option [0 ]);
68+ $ class = "MVC \\Command \\App \\" . ucfirst ($ option [0 ]);
7369
7470 if (isset ($ option [1 ]) && $ option [1 ] !== '' ) {
7571 $ static_method = $ option [1 ];
@@ -80,9 +76,9 @@ function appel_cmd($class,$static_method){
8076 $ class ::$ static_method ();
8177 }
8278 } else {
83- $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . "sand " . DIRECTORY_SEPARATOR . lcfirst ($ option [0 ]) . ".php " ;
79+ $ command_file = dirname (__FILE__ ) . DIRECTORY_SEPARATOR . "command " . DIRECTORY_SEPARATOR . "Sand " . DIRECTORY_SEPARATOR . ucfirst ($ option [0 ]) . ".php " ;
8480 if (is_file ($ command_file )) {
85- $ class = "MVC \\Command \\Sand \\" . lcfirst ($ option [0 ]);
81+ $ class = "MVC \\Command \\Sand \\" . ucfirst ($ option [0 ]);
8682
8783 if (isset ($ option [1 ]) && $ option [1 ] !== '' ) {
8884 $ static_method = $ option [1 ];
0 commit comments