I have a library that don't uses namespaces but uses only static methods, how could I make it available throughout the application? I'm using Symfony 3.2
1条回答 默认 最新
- dtrpv60860 2017-05-15 19:51关注
This can be done in your
composer.json
file for autoloading:"autoload": { "files": ["/path/to/my/file/with/functions.php"] }
Read more: https://codingexplained.com/coding/php/composer-autoloading-third-party-libraries-without-namespaces
Don't forget to run
composer dump-autoload
to rebuild the cached autoloader.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 Python报错怎么解决
- ¥15 simulink如何调用DLL文件
- ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
- ¥30 线性代数的问题,我真的忘了线代的知识了
- ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
- ¥188 需要修改一个工具,懂得汇编的人来。
- ¥15 livecharts wpf piechart 属性
- ¥20 数学建模,尽量用matlab回答,论文格式
- ¥15 昨天挂载了一下u盘,然后拔了
- ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题