In my symfony application I would like to crea开发者_JAVA百科te custom php class. And access that class via back end and front end. Can someone show me which folder should I put that class and how to access it?
Thanks in advance!
You can put it in the /lib
folder. There it'll be autoloaded by Symfony .
It's recommended to create subfolders in /lib
to group classes/files by their function.
(for example a directory /lib/routing
for classes that concern the routing).
精彩评论