2121/**
2222 * Bootstrap. Provides common functionality including dependency checking
2323 * algorithms and the ability to load bootstrap resources on demand.
24- *
25- * @package Core
2624 */
2725class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
2826{
@@ -73,8 +71,8 @@ protected function _initConfig()
7371 Zend_Registry::set ('configCore ' , $ configCore );
7472
7573 // check if internationalization enabled
76- if (isset ($ configCore ->internationalization ) && $ configCore ->internationalization == " 0 " ) {
77- $ configGlobal ->application ->lang = " en " ;
74+ if (isset ($ configCore ->internationalization ) && $ configCore ->internationalization == ' 0 ' ) {
75+ $ configGlobal ->application ->lang = ' en ' ;
7876 }
7977
8078 $ config = new Zend_Config_Ini (APPLICATION_CONFIG , $ configGlobal ->environment , true );
@@ -194,7 +192,7 @@ protected function _initZFDebug()
194192 'Exception ' ,
195193 'File ' => array ('basePath ' => BASE_PATH ),
196194 'Html ' ,
197- )
195+ ),
198196 );
199197
200198 $ debug = new ZFDebug_Controller_Plugin_Debug ($ options );
@@ -289,36 +287,36 @@ protected function _initRouter()
289287 $ apiModules = array ();
290288 foreach ($ modules as $ key => $ module ) {
291289 if ($ module == 1 && file_exists (BASE_PATH .'/modules/ ' .$ key ) && file_exists (
292- BASE_PATH ." /modules/ " .$ key ." /AppController.php "
290+ BASE_PATH .' /modules/ ' .$ key .' /AppController.php '
293291 )
294292 ) {
295293 $ listeModule [] = $ key ;
296294 // get web API controller directories and web API module names for enabled modules
297- if (file_exists (BASE_PATH ." /modules/ " .$ key ." /controllers/api " )) {
295+ if (file_exists (BASE_PATH .' /modules/ ' .$ key .' /controllers/api ' )) {
298296 $ frontController ->addControllerDirectory (
299- BASE_PATH ." /modules/ " .$ key ." /controllers/api " ,
300- " api " .$ key
297+ BASE_PATH .' /modules/ ' .$ key .' /controllers/api ' ,
298+ ' api ' .$ key
301299 );
302300 $ apiModules [] = $ key ;
303301 }
304302 } elseif ($ module == 1 && file_exists (BASE_PATH .'/privateModules/ ' .$ key ) && file_exists (
305- BASE_PATH ." /privateModules/ " .$ key ." /AppController.php "
303+ BASE_PATH .' /privateModules/ ' .$ key .' /AppController.php '
306304 )
307305 ) {
308306 $ listeModule [] = $ key ;
309307 // get web API controller directories and web API module names for enabled modules
310- if (file_exists (BASE_PATH ." /privateModules/ " .$ key ." /controllers/api " )) {
308+ if (file_exists (BASE_PATH .' /privateModules/ ' .$ key .' /controllers/api ' )) {
311309 $ frontController ->addControllerDirectory (
312- BASE_PATH ." /privateModules/ " .$ key ." /controllers/api " ,
313- " api " .$ key
310+ BASE_PATH .' /privateModules/ ' .$ key .' /controllers/api ' ,
311+ ' api ' .$ key
314312 );
315313 $ apiModules [] = $ key ;
316314 }
317315 }
318316 }
319317
320318 // get web API controller directory for core APIs
321- require_once BASE_PATH ." /core/ApiController.php " ;
319+ require_once BASE_PATH .' /core/ApiController.php ' ;
322320 $ frontController ->addControllerDirectory (BASE_PATH .'/core/controllers/api ' , 'rest ' );
323321 // add RESTful route for web APIs
324322 $ restRoute = new Zend_Rest_Route ($ frontController , array (), array ('rest ' ));
@@ -328,63 +326,63 @@ protected function _initRouter()
328326 $ route = $ m ;
329327 $ nameModule = $ m ;
330328 $ router ->addRoute (
331- $ nameModule ." -1 " ,
329+ $ nameModule .' -1 ' ,
332330 new Zend_Controller_Router_Route (
333- "" .$ route ." /:controller/:action/* " , array ('module ' => $ nameModule )
331+ '' .$ route .' /:controller/:action/* ' , array ('module ' => $ nameModule )
334332 )
335333 );
336334 $ router ->addRoute (
337- $ nameModule ." -2 " ,
335+ $ nameModule .' -2 ' ,
338336 new Zend_Controller_Router_Route (
339- "" .$ route ." /:controller/ " ,
337+ '' .$ route .' /:controller/ ' ,
340338 array ('module ' => $ nameModule , 'action ' => 'index ' )
341339 )
342340 );
343341 $ router ->addRoute (
344- $ nameModule ." -3 " ,
342+ $ nameModule .' -3 ' ,
345343 new Zend_Controller_Router_Route (
346- "" .$ route ." / " ,
344+ '' .$ route .' / ' ,
347345 array ('module ' => $ nameModule , 'controller ' => 'index ' , 'action ' => 'index ' )
348346 )
349347 );
350348
351- if (file_exists (BASE_PATH ." /modules/ " .$ route ." /AppController.php " )) {
352- require_once BASE_PATH ." /modules/ " .$ route ." /AppController.php " ;
349+ if (file_exists (BASE_PATH .' /modules/ ' .$ route .' /AppController.php ' )) {
350+ require_once BASE_PATH .' /modules/ ' .$ route .' /AppController.php ' ;
353351 }
354- if (file_exists (BASE_PATH ." /modules/ " .$ route ." /models/AppDao.php " )) {
355- require_once BASE_PATH ." /modules/ " .$ route ." /models/AppDao.php " ;
352+ if (file_exists (BASE_PATH .' /modules/ ' .$ route .' /models/AppDao.php ' )) {
353+ require_once BASE_PATH .' /modules/ ' .$ route .' /models/AppDao.php ' ;
356354 }
357- if (file_exists (BASE_PATH ." /modules/ " .$ route ." /models/AppModel.php " )) {
358- require_once BASE_PATH ." /modules/ " .$ route ." /models/AppModel.php " ;
355+ if (file_exists (BASE_PATH .' /modules/ ' .$ route .' /models/AppModel.php ' )) {
356+ require_once BASE_PATH .' /modules/ ' .$ route .' /models/AppModel.php ' ;
359357 }
360- if (file_exists (BASE_PATH ." /modules/ " .$ route ." /constant/module.php " )) {
361- require_once BASE_PATH ." /modules/ " .$ route ." /constant/module.php " ;
358+ if (file_exists (BASE_PATH .' /modules/ ' .$ route .' /constant/module.php ' )) {
359+ require_once BASE_PATH .' /modules/ ' .$ route .' /constant/module.php ' ;
362360 }
363361
364- if (file_exists (BASE_PATH ." /privateModules/ " .$ route ." /AppController.php " )) {
365- require_once BASE_PATH ." /privateModules/ " .$ route ." /AppController.php " ;
362+ if (file_exists (BASE_PATH .' /privateModules/ ' .$ route .' /AppController.php ' )) {
363+ require_once BASE_PATH .' /privateModules/ ' .$ route .' /AppController.php ' ;
366364 }
367- if (file_exists (BASE_PATH ." /privateModules/ " .$ route ." /models/AppDao.php " )) {
368- require_once BASE_PATH ." /privateModules/ " .$ route ." /models/AppDao.php " ;
365+ if (file_exists (BASE_PATH .' /privateModules/ ' .$ route .' /models/AppDao.php ' )) {
366+ require_once BASE_PATH .' /privateModules/ ' .$ route .' /models/AppDao.php ' ;
369367 }
370- if (file_exists (BASE_PATH ." /privateModules/ " .$ route ." /models/AppModel.php " )) {
371- require_once BASE_PATH ." /privateModules/ " .$ route ." /models/AppModel.php " ;
368+ if (file_exists (BASE_PATH .' /privateModules/ ' .$ route .' /models/AppModel.php ' )) {
369+ require_once BASE_PATH .' /privateModules/ ' .$ route .' /models/AppModel.php ' ;
372370 }
373- if (file_exists (BASE_PATH ." /privateModules/ " .$ route ." /constant/module.php " )) {
374- require_once BASE_PATH ." /privateModules/ " .$ route ." /constant/module.php " ;
371+ if (file_exists (BASE_PATH .' /privateModules/ ' .$ route .' /constant/module.php ' )) {
372+ require_once BASE_PATH .' /privateModules/ ' .$ route .' /constant/module.php ' ;
375373 }
376374
377- $ dir = BASE_PATH ." /modules/ " .$ route ." /models/base " ;
375+ $ dir = BASE_PATH .' /modules/ ' .$ route .' /models/base ' ;
378376 if (!is_dir ($ dir )) {
379- $ dir = BASE_PATH ." /privateModules/ " .$ route ." /models/base " ;
377+ $ dir = BASE_PATH .' /privateModules/ ' .$ route .' /models/base ' ;
380378 }
381379
382380 if (is_dir ($ dir )) {
383381 $ objects = scandir ($ dir );
384382 foreach ($ objects as $ object ) {
385- if ($ object != " . " && $ object != " .. " ) {
386- if (filetype ($ dir ." / " .$ object ) != " dir " ) {
387- require_once $ dir ." / " .$ object ;
383+ if ($ object != ' . ' && $ object != ' .. ' ) {
384+ if (filetype ($ dir .' / ' .$ object ) != ' dir ' ) {
385+ require_once $ dir .' / ' .$ object ;
388386 }
389387 }
390388 }
0 commit comments