开发者

In Symfony, in which directory do I put my custom class?

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜