How To Extend Capplication Class How to extend CApplication class without rewriting CWebapplication,
Posted 15 March 2013 - 12:34 AM
can you please help me a little, how can i extend capplication class, i need some core thing there, that will be common in WebApplication and ConsoleApplication, and i also don't want to rewrite CWebApplication code. for example see this code
"WebApplication extends CWebApplication" and "ConsoleApplication extends CConsoleApplication", and i want something common in both so i have to "Application extends CApplication", but how CWebApplication and CConsoleApplication extends from this "Application"
i want my code to be suppoted in php 5.3,
do you have any idea, best pratices, any solution,
Thanks, all for this great framework
Posted 19 March 2013 - 01:27 AM
please suggest me some good examples of code if you know any, or something about idea,
Posted 19 March 2013 - 01:36 AM
Besides that, I am not really using modules much myself, as I always end up making them application specific anyway (and thus defeating the purpose).
You can use CAction to attach common functionality to controllers. I think that's better.
Browse through our wiki; there's a lot of good information there.
Or search for it. Google search is better than the forum search (which kind of sucks).
Github/Bitbucket is also a good place to look for Yii code..