<?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>Wed, 23 May 2012 04:48:28 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Girouard's Blog: FIEO with PHP 5 Interceptors]]></title>
      <guid>http://www.phpdeveloper.org/news/9001</guid>
      <link>http://www.phpdeveloper.org/news/9001</link>
      <description><![CDATA[<p>
<i>Michael Girouard</i> has a <a href="http://www.lovemikeg.com/blog/2007/10/30/feio-with-php-5-interceptors/">post on his blog</a> about something that's becoming more and more wide-spread in the PHP community (thankfully) - filtering input from users and escaping the output to ensure the safety of your application.
</p>
<blockquote>
The idea itself is simple. When data comes into your application, it must be filtered prior to it actually being used for any reason. This means all data. Form values, URL values, and yes, even the values in the forever useful $_SERVER superglobal. [...] Before leaving your application, data should be properly escaped with the specific output medium in mind. 
</blockquote>
<p>
<a href="http://www.lovemikeg.com/blog/2007/10/23/the-abstract-collection/">Previously</a> he showed how, using an interceptor method in PHP5, you could build "collections of data". He uses the same sort of method here, appling custom filters to the data based on the output call. Code is included for both the filtering interface and two example filters - one for SQL and the other for HTML.
</p>
<p>
You can also <a href="http://www.lovemikeg.com/downloads/DataFilter.php.txt">grab the code</a> if you just want to play with that.
</p>]]></description>
      <pubDate>Thu, 08 Nov 2007 08:41:00 -0600</pubDate>
    </item>
  </channel>
</rss>

