[英]CodeIgniter HMVC: extend a library or create a global controller?
I've started using HMVC in Codeigniter with Modular Extension and i want to create a set of methods avalaible in the whole application. 我已经开始在带有Modular Extension的Codeigniter中使用HMVC,并且我想在整个应用程序中创建一组可用的方法。
For example i've this three methods: 例如,我有这三种方法:
What's the best way to do this: 最好的方法是什么:
now i'm using the first solution but I have come to doubt that it can slow down the application. 现在我正在使用第一个解决方案,但是我开始怀疑它会减慢应用程序的速度。
I would put this one in a base controller. 我会将其放在基本控制器中。 Like this one: https://github.com/jamierumbelow/codeigniter-base-controller 像这样的一个: https : //github.com/jamierumbelow/codeigniter-base-controller
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.