Re: How Can I use different AppController with specific route prefix!?
On Thursday, 10 January 2013 19:55:49 UTC+1, Khaled Attia wrote:
Hello,I'm going to create API provider for my application, and I don't want to split the API from the main app because there is a lot of tables relations in models and components and other stuff that I want to use with the API, In same time I don't want to use the main AppController because there is a lot of things that happen with each controller (DB queries, load helpers, components, redirects, ...etc) that I don't want to use in API.I tried to create a new directory and at it to App::Build
Don't do that - in short is won't work.
If you don't want your ApiAppController to extend AppController - then (surprise) extend Controller and mission accomplished. If your Api code is not already in a plugin - that's of course something you should change first, so that your api code is encapsulated in a tidy folder.
AD
-- Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home