<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 06 Jan 2009 04:23:56 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: Practical PHP events]]></title>
      <guid>http://www.phpdeveloper.org/news/6559</guid>
      <link>http://www.phpdeveloper.org/news/6559</link>
      <description><![CDATA[<p>
In his <a href="http://www.alexatnet.com/Blog/Index/2006-10-24/practical-php-events">latest tutorial</a>, <i>Alexander Netkachev</i> shows how to, with some of the simple PHP functions, create an event system for your script, complete with callbacks.
</p>
<blockquote>
The way how events are raised and how listeners are attached on the events is a part of a core in many modern applications. It plays an important role in some enterprise design patterns (MVC, for example). 
</blockquote>
<p>
He starts with the basics of event handling - some of the terms and descriptions of basic functionality that any good event handler would have. He describes the most common setup of an event-interaction relationship. Then, it's on to the code, showing first three different ways to call functions (by name, by variable, and by callback).
</p>
<p>
He <a href="http://www.alexatnet.com/Blog/Index/2006-10-24/practical-php-events">finishes it off</a> with a functional example that responds to a a call to fireEvent (five times) and handles each by calling the function in the callback information (myFunction).
</p>]]></description>
      <pubDate>Tue, 24 Oct 2006 07:20:48 -0500</pubDate>
    </item>
  </channel>
</rss>
