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.
+4
A:
No event like C# in PHP but you can implement a Observer Pattern to attach delegate to be notified.
Daok
2010-02-05 22:16:26
+2
A:
The Prado PHP Framework is an event driven framework that may appeal to you, especially since you are coming from the land of C# and presumably ASP.NET.
Take a look at the Quick Start. Specifically, take a look at the code under the Control Reference. There are plenty of code samples for you to look at and see if it is something like what you are looking for.
Bart
2010-02-05 22:17:58
+1
A:
SPL - the Standard PHP Library provides the SplObserver and SplSubject interfaces for implementing the observer pattern in PHP
meouw
2010-02-06 09:35:17