I want to organiize my components a bit better than just putting everything in the "components" folder. It does not seem like I am allowed to however. So I am wondering if any of you guys have experienced the same. Heres my problem:
I have a group of classes, to extending from an abstract class, which i put in /components/Mail/. Then I put in the import statement in main.php application.components.. I have also tried application.components.Mail., and specified the path to every class directly.
This disables Yii of even creating the CWebapp object, "failed to open stream: No such file or directory (/home/ole/workspace/project/framework/YiiBase.php:396)". In the other case the class I am instantiating is not called.
I have checked that the php files have the exact same name as the class, which could be a problem.
Yes, you’re definitely allowed to order your libraries any way you want. Have a look at an example of my folder structure and config.
You’re on the right track with: application.components.Mail.* Are you on a *nix or Windows machine? Maybe you could post a screenshot or code from main.php.
You do not need to create additional autoloader, as previously suggested.
Check your paths and the path aliases you have set.
I have organized my components and there is no problem.
So, for example, I have my workflow component files in /components/workflow/. To load them, all I have to do is to import ‘application.components.workflow.*’