mercredi 28 janvier 2015

Symfony2 bundle name, short version?


Examples given in Symfony 2 webpage



Namespace Bundle Class Name
Acme\Bundle\BlogBundle AcmeBlogBundle
Acme\Bundle\Social\BlogBundle AcmeSocialBlogBundle
Acme\BlogBundle AcmeBlogBundle


My vendor name is 9 characters large, but I find it redundant to have MyVendorName/ForumBundle and class name MyVendorNameForumBundle.php if it resides already in MyVendorName/ForumBundle directory.


Will it bring me future problems if I just name my primary class ForumBundle supposing I want to share? Obviously, the namespace is still MyVendorName/ForumBundle.


Is that class actually used somewhere or is just a one-time config somewhere?


My main concern is that I don't want to use the large name (eg MyVendorName/MyVendorNameForumBundle::someMethod()) everytime I need to access it.


Maybe this isn't all correct, I am new to Symfony 2.


Thanks





Aucun commentaire:

Enregistrer un commentaire