<?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>Thu, 24 May 2012 05:47:41 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[LivePipe Blog: Complex Sorting with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8138</guid>
      <link>http://www.phpdeveloper.org/news/8138</link>
      <description><![CDATA[<p>
On the LivePipe blog today, there's a <a href="http://livepipe.net/blog/programming/complex_sorting">quick new article</a> demonstrating a sorting method that can be used for more than just simple datasources:
</p>
<blockquote>
Most often when I need to sort complex data sets, I'm using some sort of SQL backend. Today I needed to do complex sorting of Reflection objects for some auto generating documentation I'm working on for the upcoming Picora release. [...] In the usort() examples, I had always been under the assumption that the return values had to be 0, 1 or -1. Today I learned that is not true at all, and you can come up with your own scoring system with any range, negative or positive.
</blockquote>
<p>
He illustrates the point with <a href="http://livepipe.net/blog/programming/complex_sorting">a simple example</a> showing the sorting of the documentation for Picora. In his protected function, scoreFromMethod, he defines the return array with several values instead of just the one.
</p>]]></description>
      <pubDate>Thu, 28 Jun 2007 07:11:21 -0500</pubDate>
    </item>
  </channel>
</rss>

