Hello,

I'm thinking of grouping "modules" together for the purpose of keeping
things separate not only by MVC but also by module. So I was thinking
of having my directory structure look like the following:

- /config
- /modules
   - /post
      - /models
      - /controllers
      - /views
   - /user
      - /models
      - /controllers
      - /views
- /plugins
- /tests
- /helpers
- /themes
   - /default
      - /errors
      - /layout
- /tmp
- /vendors

Obviously this is quite a substantial change from the original
structure. Now, the only way for me to get this to work is if I modify
the path variables in bootstrap.php.

What I've done was add the following:

if ($handle = opendir(ROOT.DS.APP_DIR.DS.'modules')) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            if (is_dir(ROOT.DS.APP_DIR.DS.'modules'.DS.$file))
$modules[] = ROOT.DS.APP_DIR.DS.'modules'.DS.$file;
        }
    }
    closedir($handle);
}

foreach ($modules as $module) {
        $modelPaths[] = $module;
        $controllerPaths[] = $module;
        $viewPaths[] = $module;
}

Essentially, every "module" folder is added to model, controller, and
view paths. Is this fine or am I doing something horribly wrong here.
It seems to work, but I just want to make sure I'm doing this
properly.

Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to