事件驱动的PHP框架? [英] Event-Driven PHP Framework?

查看:184
本文介绍了事件驱动的PHP框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有任何完整的事件驱动框架,PHP是基于依赖注入来解耦的。我知道有些框架使这些模式使用,但最终应用程序的整个生命周期仍然是预先定义的,并且在线性方面。

I'm wondering if there are any completely event-drive frameworks out there for PHP which are based around dependency injection for decoupling. I know there are some frameworks that make use of these patterns - but in the end the entire life-cycle of the application is still pre-defined and linear in style.

例如,大多数框架都构建为从HTTP请求接收,处理和返回结果。事件驱动框架将具有处理能力,也可以用于新的目的,如后台处理,命令行交互或其他非标准用例。

For example, most frameworks are built to receive, process, and return results from HTTP requests. An event drive framework would have handlers for that, but also be able to be used for new purposes like background processing, command line interaction, or other non-standard use cases.

推荐答案

听起来像我的光子框架最符合你的描述 - 关键关键是你不能有事件驱动的代码,没有php运行在一个类似daemon的进程。您选择的网络服务器实际上决定了您所要求的是否可能 - 光子依赖于 mongrel2

It sounds to me like the Photon framework fits closest to your description - the key point is that you can't have event-driven code without php running in a daemon-like process. Your choice of webserver in fact dictates whether what you ask is possible or not - photon is dependent on mongrel2.

这篇关于事件驱动的PHP框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆