开发者

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

开发者 https://www.devze.com 2023-03-13 11:11 出处:网络
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

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

精彩评论

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