Re: Bootstrap access to a model?
ah nice, thanks for pointing that out. On Fri, Jan 7, 2011 at 12:29 PM, Miles J wrote: > Yeah, I have done exactly this before :] > > https://github.com/milesj/cake-forum/blob/master/models/setting.php > > On Jan 6, 5:00 pm, Greg Skerman wrote: > > is it worth wrapping it all up in a DB tableless model to take advantage > of > > validation magic and so forth? > > > > On Fri, Jan 7, 2011 at 10:44 AM, Miles J > wrote: > > > Saving the routes to a file will probably be much easier and less > > > error prone then trying to connect to the database during the > > > bootstrap process. Most likely less logic required also. > > > > > On Jan 6, 4:13 pm, Greg Skerman wrote: > > > > they wont be editing the php files themselves, no unless they > want > > > to.. > > > > but i'm trying to provide an option that doesn't require them to know > how > > > to > > > > code to do it > > > > > > I intended on caching the result from the DB which would be akin to > > > > serializing an array and saving to the file system.db just seemed > > > like a > > > > logical place to persist it > > > > > > On Fri, Jan 7, 2011 at 9:44 AM, Miles J > wrote: > > > > > I guess I still don't understand why a database is needed for this? > > > > > Are they not going to be editing the PHP files themselves? > > > > > > > If they aren't, then just save the "routes" as a serialized array > into > > > > > the filesystem and load that everytime instead of hitting the > > > > > database. > > > > > > > On Jan 6, 3:41 pm, Greg Skerman wrote: > > > > > > Miles, not users, site admins. > > > > > > The reason i want them to be able to define routes is so they can > > > define > > > > > > their URL structure themselves, and not have it imposed on them > by > > > the > > > > > > content management system > > > > > > > > suppose they have > > > > > > /articles/1 > > > > > > /articles/2 > > > > > > /articles/3 > > > > > > > > but want them to be accessed as: > > > > > > > > /products > > > > > > /products/services > > > > > > /about > > > > > > > > ...basically i want a way that they can add content to the site, > and > > > then > > > > > > arrange the URLs in anyway they see fit. > > > > > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J > > > > wrote: > > > > > > > Why are you allowing users to define routes? > > > > > > > > > On Jan 6, 8:59 am, majna wrote: > > > > > > > > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > > > > > But this will break reverse routing, if used. All routes must > be > > > > > > > > "connected" for reverse routing to work. > > > > > > > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > So i've ditched the idea of having one controller call > another. > > > > > > > Instead, > > > > > > > > > i've decided a better approach might be to use routes, and > have > > > > > > > "custom" > > > > > > > > > routes stored in a database, added at runtime in > bootstrap.php, > > > and > > > > > of > > > > > > > > > course cached. > > > > > > > > > > > This will allow people to define their own simple routes > for > > > site > > > > > map > > > > > > > > > organization. > > > > > > > > > > > So, I know I can probably use App::Import('Controller', > > > > > > > 'CustomRoutes'); in > > > > > > > > > bootstrap, and manually initialize the class, but are there > any > > > > > reasons > > > > > > > why > > > > > > > > > i shouldn't do this? I'd appreciate thoughts on whether > > > > > bootstrapping a > > > > > > > > > controller/model is a good thing or a bad thing. > > > > > > > > > > > Have at it :) > > > > > > > > > Check out the new CakePHP Questions > sitehttp://cakeqs.organdhelp > > > > > others > > > > > > > with their CakePHP related questions. > > > > > > > > > You received this message because you are subscribed to the > Google > > > > > Groups > > > > > > > "CakePHP" group. > > > > > > > To post to this group, send email to cake-php@googlegroups.com > > > > > > > To unsubscribe from this group, send email to > > > > > > > cake-php+unsubscr...@googlegroups.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>For > > > > > more options, visit this group at > > > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > others > > > > > with their CakePHP related questions. > > > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "CakePHP" group. > > > > > To post to this group, send email to cake-php@googlegroups.com > > > > > To unsubscribe from this group, send email to > > > > > cake-php+unsubscr...@googlegroups.com > > > > > > > > >>For > > > more options, visit this group at > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help > others > > > with their CakePHP related questions. > > > > > You received this message
Re: Bootstrap access to a model?
Yeah, I have done exactly this before :] https://github.com/milesj/cake-forum/blob/master/models/setting.php On Jan 6, 5:00 pm, Greg Skerman wrote: > is it worth wrapping it all up in a DB tableless model to take advantage of > validation magic and so forth? > > On Fri, Jan 7, 2011 at 10:44 AM, Miles J wrote: > > Saving the routes to a file will probably be much easier and less > > error prone then trying to connect to the database during the > > bootstrap process. Most likely less logic required also. > > > On Jan 6, 4:13 pm, Greg Skerman wrote: > > > they wont be editing the php files themselves, no unless they want > > to.. > > > but i'm trying to provide an option that doesn't require them to know how > > to > > > code to do it > > > > I intended on caching the result from the DB which would be akin to > > > serializing an array and saving to the file system.db just seemed > > like a > > > logical place to persist it > > > > On Fri, Jan 7, 2011 at 9:44 AM, Miles J wrote: > > > > I guess I still don't understand why a database is needed for this? > > > > Are they not going to be editing the PHP files themselves? > > > > > If they aren't, then just save the "routes" as a serialized array into > > > > the filesystem and load that everytime instead of hitting the > > > > database. > > > > > On Jan 6, 3:41 pm, Greg Skerman wrote: > > > > > Miles, not users, site admins. > > > > > The reason i want them to be able to define routes is so they can > > define > > > > > their URL structure themselves, and not have it imposed on them by > > the > > > > > content management system > > > > > > suppose they have > > > > > /articles/1 > > > > > /articles/2 > > > > > /articles/3 > > > > > > but want them to be accessed as: > > > > > > /products > > > > > /products/services > > > > > /about > > > > > > ...basically i want a way that they can add content to the site, and > > then > > > > > arrange the URLs in anyway they see fit. > > > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J > > wrote: > > > > > > Why are you allowing users to define routes? > > > > > > > On Jan 6, 8:59 am, majna wrote: > > > > >http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > > > > But this will break reverse routing, if used. All routes must be > > > > > > > "connected" for reverse routing to work. > > > > > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > > > > > Hi, > > > > > > > > > So i've ditched the idea of having one controller call another. > > > > > > Instead, > > > > > > > > i've decided a better approach might be to use routes, and have > > > > > > "custom" > > > > > > > > routes stored in a database, added at runtime in bootstrap.php, > > and > > > > of > > > > > > > > course cached. > > > > > > > > > This will allow people to define their own simple routes for > > site > > > > map > > > > > > > > organization. > > > > > > > > > So, I know I can probably use App::Import('Controller', > > > > > > 'CustomRoutes'); in > > > > > > > > bootstrap, and manually initialize the class, but are there any > > > > reasons > > > > > > why > > > > > > > > i shouldn't do this? I'd appreciate thoughts on whether > > > > bootstrapping a > > > > > > > > controller/model is a good thing or a bad thing. > > > > > > > > > Have at it :) > > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > > others > > > > > > with their CakePHP related questions. > > > > > > > You received this message because you are subscribed to the Google > > > > Groups > > > > > > "CakePHP" group. > > > > > > To post to this group, send email to cake-php@googlegroups.com > > > > > > To unsubscribe from this group, send email to > > > > > > cake-php+unsubscr...@googlegroups.com > > > > > > > > > > > >>For > > > > more options, visit this group at > > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > others > > > > with their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > > Groups > > > > "CakePHP" group. > > > > To post to this group, send email to cake-php@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com > > >For > > more options, visit this group at > > > >http://groups.google.com/group/cake-php?hl=en > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions
Re: Bootstrap access to a model?
is it worth wrapping it all up in a DB tableless model to take advantage of validation magic and so forth? On Fri, Jan 7, 2011 at 10:44 AM, Miles J wrote: > Saving the routes to a file will probably be much easier and less > error prone then trying to connect to the database during the > bootstrap process. Most likely less logic required also. > > On Jan 6, 4:13 pm, Greg Skerman wrote: > > they wont be editing the php files themselves, no unless they want > to.. > > but i'm trying to provide an option that doesn't require them to know how > to > > code to do it > > > > I intended on caching the result from the DB which would be akin to > > serializing an array and saving to the file system.db just seemed > like a > > logical place to persist it > > > > On Fri, Jan 7, 2011 at 9:44 AM, Miles J wrote: > > > I guess I still don't understand why a database is needed for this? > > > Are they not going to be editing the PHP files themselves? > > > > > If they aren't, then just save the "routes" as a serialized array into > > > the filesystem and load that everytime instead of hitting the > > > database. > > > > > On Jan 6, 3:41 pm, Greg Skerman wrote: > > > > Miles, not users, site admins. > > > > The reason i want them to be able to define routes is so they can > define > > > > their URL structure themselves, and not have it imposed on them by > the > > > > content management system > > > > > > suppose they have > > > > /articles/1 > > > > /articles/2 > > > > /articles/3 > > > > > > but want them to be accessed as: > > > > > > /products > > > > /products/services > > > > /about > > > > > > ...basically i want a way that they can add content to the site, and > then > > > > arrange the URLs in anyway they see fit. > > > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J > wrote: > > > > > Why are you allowing users to define routes? > > > > > > > On Jan 6, 8:59 am, majna wrote: > > > > >http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > > > But this will break reverse routing, if used. All routes must be > > > > > > "connected" for reverse routing to work. > > > > > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > > > > > Hi, > > > > > > > > > So i've ditched the idea of having one controller call another. > > > > > Instead, > > > > > > > i've decided a better approach might be to use routes, and have > > > > > "custom" > > > > > > > routes stored in a database, added at runtime in bootstrap.php, > and > > > of > > > > > > > course cached. > > > > > > > > > This will allow people to define their own simple routes for > site > > > map > > > > > > > organization. > > > > > > > > > So, I know I can probably use App::Import('Controller', > > > > > 'CustomRoutes'); in > > > > > > > bootstrap, and manually initialize the class, but are there any > > > reasons > > > > > why > > > > > > > i shouldn't do this? I'd appreciate thoughts on whether > > > bootstrapping a > > > > > > > controller/model is a good thing or a bad thing. > > > > > > > > > Have at it :) > > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > > others > > > > > with their CakePHP related questions. > > > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "CakePHP" group. > > > > > To post to this group, send email to cake-php@googlegroups.com > > > > > To unsubscribe from this group, send email to > > > > > cake-php+unsubscr...@googlegroups.com > > > > > > > > >>For > > > more options, visit this group at > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help > others > > > with their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com > >For > more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/c
Re: Bootstrap access to a model?
Saving the routes to a file will probably be much easier and less error prone then trying to connect to the database during the bootstrap process. Most likely less logic required also. On Jan 6, 4:13 pm, Greg Skerman wrote: > they wont be editing the php files themselves, no unless they want to.. > but i'm trying to provide an option that doesn't require them to know how to > code to do it > > I intended on caching the result from the DB which would be akin to > serializing an array and saving to the file system.db just seemed like a > logical place to persist it > > On Fri, Jan 7, 2011 at 9:44 AM, Miles J wrote: > > I guess I still don't understand why a database is needed for this? > > Are they not going to be editing the PHP files themselves? > > > If they aren't, then just save the "routes" as a serialized array into > > the filesystem and load that everytime instead of hitting the > > database. > > > On Jan 6, 3:41 pm, Greg Skerman wrote: > > > Miles, not users, site admins. > > > The reason i want them to be able to define routes is so they can define > > > their URL structure themselves, and not have it imposed on them by the > > > content management system > > > > suppose they have > > > /articles/1 > > > /articles/2 > > > /articles/3 > > > > but want them to be accessed as: > > > > /products > > > /products/services > > > /about > > > > ...basically i want a way that they can add content to the site, and then > > > arrange the URLs in anyway they see fit. > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J wrote: > > > > Why are you allowing users to define routes? > > > > > On Jan 6, 8:59 am, majna wrote: > > >http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > > But this will break reverse routing, if used. All routes must be > > > > > "connected" for reverse routing to work. > > > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > > > Hi, > > > > > > > So i've ditched the idea of having one controller call another. > > > > Instead, > > > > > > i've decided a better approach might be to use routes, and have > > > > "custom" > > > > > > routes stored in a database, added at runtime in bootstrap.php, and > > of > > > > > > course cached. > > > > > > > This will allow people to define their own simple routes for site > > map > > > > > > organization. > > > > > > > So, I know I can probably use App::Import('Controller', > > > > 'CustomRoutes'); in > > > > > > bootstrap, and manually initialize the class, but are there any > > reasons > > > > why > > > > > > i shouldn't do this? I'd appreciate thoughts on whether > > bootstrapping a > > > > > > controller/model is a good thing or a bad thing. > > > > > > > Have at it :) > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > others > > > > with their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > > Groups > > > > "CakePHP" group. > > > > To post to this group, send email to cake-php@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com > > >For > > more options, visit this group at > > > >http://groups.google.com/group/cake-php?hl=en > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Bootstrap access to a model?
they wont be editing the php files themselves, no unless they want to.. but i'm trying to provide an option that doesn't require them to know how to code to do it I intended on caching the result from the DB which would be akin to serializing an array and saving to the file system.db just seemed like a logical place to persist it On Fri, Jan 7, 2011 at 9:44 AM, Miles J wrote: > I guess I still don't understand why a database is needed for this? > Are they not going to be editing the PHP files themselves? > > If they aren't, then just save the "routes" as a serialized array into > the filesystem and load that everytime instead of hitting the > database. > > On Jan 6, 3:41 pm, Greg Skerman wrote: > > Miles, not users, site admins. > > The reason i want them to be able to define routes is so they can define > > their URL structure themselves, and not have it imposed on them by the > > content management system > > > > suppose they have > > /articles/1 > > /articles/2 > > /articles/3 > > > > but want them to be accessed as: > > > > /products > > /products/services > > /about > > > > ...basically i want a way that they can add content to the site, and then > > arrange the URLs in anyway they see fit. > > > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J wrote: > > > Why are you allowing users to define routes? > > > > > On Jan 6, 8:59 am, majna wrote: > > > > > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > > But this will break reverse routing, if used. All routes must be > > > > "connected" for reverse routing to work. > > > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > > > Hi, > > > > > > > So i've ditched the idea of having one controller call another. > > > Instead, > > > > > i've decided a better approach might be to use routes, and have > > > "custom" > > > > > routes stored in a database, added at runtime in bootstrap.php, and > of > > > > > course cached. > > > > > > > This will allow people to define their own simple routes for site > map > > > > > organization. > > > > > > > So, I know I can probably use App::Import('Controller', > > > 'CustomRoutes'); in > > > > > bootstrap, and manually initialize the class, but are there any > reasons > > > why > > > > > i shouldn't do this? I'd appreciate thoughts on whether > bootstrapping a > > > > > controller/model is a good thing or a bad thing. > > > > > > > Have at it :) > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help > others > > > with their CakePHP related questions. > > > > > You received this message because you are subscribed to the Google > Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com > >For > more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Bootstrap access to a model?
I guess I still don't understand why a database is needed for this? Are they not going to be editing the PHP files themselves? If they aren't, then just save the "routes" as a serialized array into the filesystem and load that everytime instead of hitting the database. On Jan 6, 3:41 pm, Greg Skerman wrote: > Miles, not users, site admins. > The reason i want them to be able to define routes is so they can define > their URL structure themselves, and not have it imposed on them by the > content management system > > suppose they have > /articles/1 > /articles/2 > /articles/3 > > but want them to be accessed as: > > /products > /products/services > /about > > ...basically i want a way that they can add content to the site, and then > arrange the URLs in anyway they see fit. > > On Fri, Jan 7, 2011 at 4:24 AM, Miles J wrote: > > Why are you allowing users to define routes? > > > On Jan 6, 8:59 am, majna wrote: > > >http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > > But this will break reverse routing, if used. All routes must be > > > "connected" for reverse routing to work. > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > Hi, > > > > > So i've ditched the idea of having one controller call another. > > Instead, > > > > i've decided a better approach might be to use routes, and have > > "custom" > > > > routes stored in a database, added at runtime in bootstrap.php, and of > > > > course cached. > > > > > This will allow people to define their own simple routes for site map > > > > organization. > > > > > So, I know I can probably use App::Import('Controller', > > 'CustomRoutes'); in > > > > bootstrap, and manually initialize the class, but are there any reasons > > why > > > > i shouldn't do this? I'd appreciate thoughts on whether bootstrapping a > > > > controller/model is a good thing or a bad thing. > > > > > Have at it :) > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Bootstrap access to a model?
Miles, not users, site admins. The reason i want them to be able to define routes is so they can define their URL structure themselves, and not have it imposed on them by the content management system suppose they have /articles/1 /articles/2 /articles/3 but want them to be accessed as: /products /products/services /about ...basically i want a way that they can add content to the site, and then arrange the URLs in anyway they see fit. On Fri, Jan 7, 2011 at 4:24 AM, Miles J wrote: > Why are you allowing users to define routes? > > On Jan 6, 8:59 am, majna wrote: > > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > But this will break reverse routing, if used. All routes must be > > "connected" for reverse routing to work. > > > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > > > Hi, > > > > > So i've ditched the idea of having one controller call another. > Instead, > > > i've decided a better approach might be to use routes, and have > "custom" > > > routes stored in a database, added at runtime in bootstrap.php, and of > > > course cached. > > > > > This will allow people to define their own simple routes for site map > > > organization. > > > > > So, I know I can probably use App::Import('Controller', > 'CustomRoutes'); in > > > bootstrap, and manually initialize the class, but are there any reasons > why > > > i shouldn't do this? I'd appreciate thoughts on whether bootstrapping a > > > controller/model is a good thing or a bad thing. > > > > > Have at it :) > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Bootstrap access to a model?
Why are you allowing users to define routes? On Jan 6, 8:59 am, majna wrote: > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > But this will break reverse routing, if used. All routes must be > "connected" for reverse routing to work. > > On Jan 6, 4:57 am, Greg Skerman wrote: > > > Hi, > > > So i've ditched the idea of having one controller call another. Instead, > > i've decided a better approach might be to use routes, and have "custom" > > routes stored in a database, added at runtime in bootstrap.php, and of > > course cached. > > > This will allow people to define their own simple routes for site map > > organization. > > > So, I know I can probably use App::Import('Controller', 'CustomRoutes'); in > > bootstrap, and manually initialize the class, but are there any reasons why > > i shouldn't do this? I'd appreciate thoughts on whether bootstrapping a > > controller/model is a good thing or a bad thing. > > > Have at it :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Bootstrap access to a model?
http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp But this will break reverse routing, if used. All routes must be "connected" for reverse routing to work. On Jan 6, 4:57 am, Greg Skerman wrote: > Hi, > > So i've ditched the idea of having one controller call another. Instead, > i've decided a better approach might be to use routes, and have "custom" > routes stored in a database, added at runtime in bootstrap.php, and of > course cached. > > This will allow people to define their own simple routes for site map > organization. > > So, I know I can probably use App::Import('Controller', 'CustomRoutes'); in > bootstrap, and manually initialize the class, but are there any reasons why > i shouldn't do this? I'd appreciate thoughts on whether bootstrapping a > controller/model is a good thing or a bad thing. > > Have at it :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Bootstrap access to a model?
Hi, So i've ditched the idea of having one controller call another. Instead, i've decided a better approach might be to use routes, and have "custom" routes stored in a database, added at runtime in bootstrap.php, and of course cached. This will allow people to define their own simple routes for site map organization. So, I know I can probably use App::Import('Controller', 'CustomRoutes'); in bootstrap, and manually initialize the class, but are there any reasons why i shouldn't do this? I'd appreciate thoughts on whether bootstrapping a controller/model is a good thing or a bad thing. Have at it :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en