Because plugins are supposed to act independently and not rely on
other model/controller/views of the application.
On Oct 10, 10:24 am, mark_story <[EMAIL PROTECTED]> wrote:
> Why is one question. Another is why not use plugins?
>
> -Mark
>
> On Oct 10, 12:24 am, Steve <[EMAIL PROTECTED]> wrote:
>
> > Let me just update that bootstrap code. I got rid of the extra loop:
>
> > 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))
> > {
> > $module =
> > ROOT.DS.APP_DIR.DS.'modules'.DS.$file;
> > $modelPaths[] = $module;
> > $controllerPaths[] = $module;
> > $viewPaths[] = $module;
> > }
> > }
> > }
> > closedir($handle);
>
> > }
>
> > So again, are there any potential problems with doing this?
>
> > On Oct 10, 12:19 am, Steve <[EMAIL PROTECTED]> wrote:
>
> > > 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
-~----------~----~----~----~------~----~------~--~---