<?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>Sun, 06 Jul 2008 17:08:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[John Rockefeller's Blog: PHP Tricks: How To Handle Multiple Domains]]></title>
      <guid>http://www.phpdeveloper.org/news/10278</guid>
      <link>http://www.phpdeveloper.org/news/10278</link>
      <description><![CDATA[<p>
<i>John Rockefeller</i> has <a href="http://www.johnrockefeller.net/?p=194">a tip</a> he'd like to share with all of the other PHP developers out there - a little method he's come up with to host multiple domains off of the same code.
</p>
<blockquote>
This is really handy for those of us who have the same code handling multiple sites or multiple sub-domains. A case in point: When I coded NetBoardz (my free forum hosting service now defunct), I had one codebase handling all 250 forums. How? Simple. When the code runs, it determines which site the user is loading and does different things (like using different databases) dynamically.
</blockquote>
<p>
He shows the two <a href="http://www.johnrockefeller.net/?p=194">key points</a> to dividing things up - grabbing the domain and subdomain they were trying to access. This can be fed into a script that can switch things like layout or even functionality based on which site they've chosen.
</p>]]></description>
      <pubDate>Tue, 27 May 2008 11:11:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP in Action Blog: I want enums in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10159</guid>
      <link>http://www.phpdeveloper.org/news/10159</link>
      <description><![CDATA[<blockquote>I want Enums in PHP</blockquote>
<p>
That's how <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=36&blogId=1">this new post</a> on the PHP in Action blog starts this morning. The one thing that he wants is enumeration support in PHP. He shows how it can currently come close with a "roles" system:
</p>
<blockquote>
Useful examples I've encountered in web programming are states or stages in a process and user roles. Another kind of example is one I used in PHP In Action: an authorization system with three fixed roles or categories of user: regular, webmaster and administrator.
</blockquote>
<p>
He sets up an example class that sets constants for the different access levels rather than just relying on strings to handle it (which, as he points out, could very easily be misspelled and not throw any kind of error) .
</p>]]></description>
      <pubDate>Mon, 12 May 2008 08:41:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SaniSoft Blog: Multiple validation rules per model field while baking]]></title>
      <guid>http://www.phpdeveloper.org/news/10070</guid>
      <link>http://www.phpdeveloper.org/news/10070</link>
      <description><![CDATA[<p>
If you're a CakePHP user and have been frustrated by how this "bake" functionality doesn't allow for more than one validation rule on a given field, check out <a href="http://www.sanisoft.com/blog/2008/04/29/multiple-validation-rules-per-model-field-while-baking/">the new post</a> on the SaniSoft blog (from <i>Amit Badkas</i>):
</p>
<blockquote>
This is not much of a problem if you have only a few models but when you start to work on several dozen models in a project it becomes very tedious to open each and every model file to make changes.
</blockquote>
<p>
The result of his frustration has come out in the form of a <a href="https://trac.cakephp.org/attachment/ticket/3959/model.php.patch.txt">patch</a> as a part of a new ticket in the CakePHP request submission process.
</p>]]></description>
      <pubDate>Tue, 29 Apr 2008 16:12:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Using Zend_Feed to Merge Multiple RSS Feeds]]></title>
      <guid>http://www.phpdeveloper.org/news/9929</guid>
      <link>http://www.phpdeveloper.org/news/9929</link>
      <description><![CDATA[<p>
On the Zend Developer Zone, a <a href="http://devzone.zend.com/article/3208-Using-Zend_Feed-to-Merge-Multiple-RSS-Feeds">new tutorial</a> has been posted that anyone looking to "blend feeds" might want to take a look at. It's a guide to using the Zend_Feed component of the <a href="http://framework.zend.com">Zend Framework</a> to combine the contents of multiple RSS feeds.
</p>
<blockquote>
As part of my playing around with the Zend Framework, I've decided to make this merged RSS feed using the Zend_Feed component. Actually at the end I've realized that this merged feed idea is quite useless, but at least this post came out of it :-)
</blockquote>
<p>
He developed it originally as a way to combine his twitter and blog feeds into one thing to provide the latest updates to readers from both in one simple place. He shows how to take in the two feeds, each in its own feed object and merge them into one array. This array is then pushed back out to the visitor an the RSS format (thanks to Zend_Feed_Rss).
</p>]]></description>
      <pubDate>Tue, 08 Apr 2008 10:32:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBuildings Blog: Multithreading in PHP with CURL]]></title>
      <guid>http://www.phpdeveloper.org/news/9892</guid>
      <link>http://www.phpdeveloper.org/news/9892</link>
      <description><![CDATA[<p>
As mentioned on <a href="http://devzone.zend.com/article/3341-Multithreading-in-PHP-with-CURL">the Zend Developer Zone</a>, there's a <a href="http://www.ibuildings.com/blog/archives/811-Multithreading-in-PHP-with-CURL.html">new tutorial</a> posted on the IBuildings blog (by <i>Lineke Kerckhoffs-Willems</i>) about performing some multi-threading magic in PHP with the help of cURL.
</p>
<blockquote>
Each PHP request is a separate thread. There are some workarounds like using pcntl_fork, starting multiple commandline php processes using the exec command or even using ajax. Another possibility is using the Curl library. Besides the basic functions described above Curl offers the "multi" functions for retrieving content from several url's at the same time.
</blockquote>
<p>
<a href="http://www.ibuildings.com/blog/archives/811-Multithreading-in-PHP-with-CURL.html">Examples</a> are included showing how to make these "multi" requests via <a href="http://www.php.net/curl">PHP's cURL support</a> (calling URLs with a "seconds" value on the end).
</p>]]></description>
      <pubDate>Tue, 01 Apr 2008 16:23:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Executing Destructors Manually in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9623</guid>
      <link>http://www.phpdeveloper.org/news/9623</link>
      <description><![CDATA[<p>
Finishing off their series on destructors in PHP5 applications today, DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Executing-Destructors-Manually-in-PHP-5/">this new tutorial</a> showing how to manually run the destructors of your class (in case there's ever a need).
</p>
<blockquote>
In this final tutorial of the series I'm going to show you how to manually trigger a destructor, and in addition you'll learn how to emulate the behavior of this magic method when using PHP 4.
</blockquote>
<p>
They not only talk about how to <a href="http://www.devshed.com/c/a/PHP/Executing-Destructors-Manually-in-PHP-5/1/">call the destructor</a> manually but they also show how to call multiple destructors at the same time to destroy lots of objects at once. And, as promised, they include <a href="http://www.devshed.com/c/a/PHP/Executing-Destructors-Manually-in-PHP-5/3/">a method</a> for being able to use a destructor-like bit of functionality in a PHP4 app as well.
</p>]]></description>
      <pubDate>Wed, 13 Feb 2008 11:27:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Retrieving Information on Several Objects with Destructors in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9584</guid>
      <link>http://www.phpdeveloper.org/news/9584</link>
      <description><![CDATA[<p>
DevShed has posted the next-to-last (part four) of their series looking at destructors in PHP5 applications today. <a href="http://www.devshed.com/c/a/PHP/Retrieving-Information-on-Several-Objects-with-Destructors-in-PHP-5/">This time</a> they focus on passing information back out of the destructors as the script is finishing.
</p>
<blockquote>
In this fourth article of the series I'm going to teach you how perform this process when working with multiple objects (remember that you already learned how to achieve this using only one class instance).
</blockquote>
<p>
They start simple, showing how to <a href="http://www.devshed.com/c/a/PHP/Retrieving-Information-on-Several-Objects-with-Destructors-in-PHP-5/1/">handle one object</a> to give you a base to work from. They modify this to expand it out and show the management instead of three different user data objects.
</p>]]></description>
      <pubDate>Thu, 07 Feb 2008 10:28:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Implementing Destructors with Multiple Objects in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9479</guid>
      <link>http://www.phpdeveloper.org/news/9479</link>
      <description><![CDATA[<p>
DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Implementing-Destructors-with-Multiple-Objects-in-PHP-5/">part two</a> in their series looking at the use of destructors in PHP5. This time they focus on their use with multiple objects inside of an application.
</p>
<blockquote>
Destructors can be used in all sorts of clever ways in the context of a given PHP 5 application, mostly in those cases where it's necessary to keep track of the status of certain objects prior to their being destroyed by the PHP interpreter. In this second chapter you'll learn how to work simultaneously with multiple classes that concretely implement their respective destructors.
</blockquote>
<p>
They revisit their previous example with a <a href="http://www.devshed.com/c/a/PHP/Implementing-Destructors-with-Multiple-Objects-in-PHP-5/1/">simple class</a> that's then extended to allow the flexibility to call the same destructor on multiple instances.
</p>]]></description>
      <pubDate>Wed, 23 Jan 2008 14:57:00 -0600</pubDate>
    </item>
  </channel>
</rss>
