PHP上的事件可能吗? [英] Events on PHP. Is it possible?
本文介绍了PHP上的事件可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
没有类似C#的事件在PHP,但你可以实现观察者模式附加代表以通知。
I'm coming from the C# world and has just started doing a little PHP coding, so I was wondering if it is possible to use events on PHP, or if it is planned to include this feature in a future release. If you have a way to simulate it, different than this, it would be very appreciated, thanks.
解决方案
No event like C# in PHP but you can implement a Observer Pattern to attach delegate to be notified.
这篇关于PHP上的事件可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文