<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP Musings &#187; OOP</title>
	<atom:link href="http://www.charles-reace.com/blog/tag/oop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.charles-reace.com/blog</link>
	<description>Random thoughts about PHP, MySQL, and life in general</description>
	<lastBuildDate>Tue, 13 Jul 2010 22:48:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Object Iteration in PHP 5</title>
		<link>http://www.charles-reace.com/blog/2010/06/01/object-iteration-in-php-5/</link>
		<comments>http://www.charles-reace.com/blog/2010/06/01/object-iteration-in-php-5/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:30:52 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[iterator]]></category>
		<category><![CDATA[object]]></category>

		<guid isPermaLink="false">http://www.charles-reace.com/blog/?p=262</guid>
		<description><![CDATA[PHP 5 gives us the ability to iterate through objects much as we can with arrays, such as with the foreach() loop construct. I knew this ability existed but had not really looked into it or made use of it. However as a result of a thread at PHPBuilder.com, I thought this might be a [...]]]></description>
		<wfw:commentRss>http://www.charles-reace.com/blog/2010/06/01/object-iteration-in-php-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginners&#8217; Corner: Learning Object-Oriented PHP</title>
		<link>http://www.charles-reace.com/blog/2009/10/27/beginners-corner-learning-object-oriented-php/</link>
		<comments>http://www.charles-reace.com/blog/2009/10/27/beginners-corner-learning-object-oriented-php/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 03:39:58 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Beginners' Corner]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[objects]]></category>

		<guid isPermaLink="false">http://www.charles-reace.com/blog/?p=231</guid>
		<description><![CDATA[I often see PHP newbies (and even not-so-newbies) who are confused by the world of object-oriented programming (OOP). At least part of this confusion results from the vast majority of introductory books and tutorials for PHP beginning by teaching procedural programming techniques, treating OOP as an &#8220;advanced&#8221; subject with a chapter or two at the [...]]]></description>
		<wfw:commentRss>http://www.charles-reace.com/blog/2009/10/27/beginners-corner-learning-object-oriented-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Akismet to Detect Spam Email</title>
		<link>http://www.charles-reace.com/blog/2008/09/06/using-akismet-to-detect-spam-email/</link>
		<comments>http://www.charles-reace.com/blog/2008/09/06/using-akismet-to-detect-spam-email/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 05:48:44 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.charles-reace.com/blog/?p=86</guid>
		<description><![CDATA[After seeing the effectiveness of the Akisment WordPress plug-in at filtering out spam comments here, I decided to see if I could use it in conjunction with a email contact form. I thought it might be interesting to some of my readers (there are at least a couple) to keep a sort of journal here [...]]]></description>
		<wfw:commentRss>http://www.charles-reace.com/blog/2008/09/06/using-akismet-to-detect-spam-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Application Constants in Interfaces</title>
		<link>http://www.charles-reace.com/blog/2008/07/25/application-constants-in-interfaces/</link>
		<comments>http://www.charles-reace.com/blog/2008/07/25/application-constants-in-interfaces/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 00:20:45 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://www.charles-reace.com/blog/?p=38</guid>
		<description><![CDATA[Here&#8217;s a little trick I discovered the other day for passing application settings around in an object-oriented implementation. You can create an interface that defines any number of class constants, then any class you define that needs those constants needs only to implement that interface. For example:
&#60;?php
/**
 * Define constants for use in other classes
 */
interface Constants
{
   const DB_HOST = 'localhost';
   const DB_USER = 'username';
   const DB_PASS = 'abc123xyzr';
   const DB_NAME = 'test';
}

/**
 * Database class based on MySQLi class
 */
class DB extends mysqli implements Constants
{   
   public function __construct()
   {
      parent::__construct(
         self::DB_HOST,
         self::DB_USER,
         self::DB_PASS,
         self::DB_NAME
      );
   }
}

The advantage of this over running some configuration script [...]]]></description>
		<wfw:commentRss>http://www.charles-reace.com/blog/2008/07/25/application-constants-in-interfaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
