<?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>Mon, 20 May 2013 03:23:37 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Nitschinger's Blog: Custom Finders with Lithium]]></title>
      <guid>http://www.phpdeveloper.org/news/16423</guid>
      <link>http://www.phpdeveloper.org/news/16423</link>
      <description><![CDATA[<p>
<i>Michael Nitschinger</i> has another post that'll interest the <a href="http://lithify.me">Lithium framework</a> users out there - how to <a href="http://nitschinger.at/Custom-Finders-with-Lithium">create custom finders</a> to help in code reuse for database requests.
</p>
<blockquote>
Finders assist you with often-used database queries so you don't have to write them over and over again. Out of the box, Lithium provides you with a bunch of them: all, first, count list and "magic finders like"  findById or findFirstById. How these are constructed in the core is not relevant for now, but Lithium provides you with a mechanism to write your own finders easily.
</blockquote>
<p>
He starts with a look at the bundled finder, showing how it uses a _findFilters method to create the default filter and pass it into your configuration. He covers the parameters you'll need to define and an example of making a Task to create a new one. His example sets a limit of five results on the response. He also mentions the ability to add a custom finder to your model, loaded in the _init() automatically.
</p>]]></description>
      <pubDate>Fri, 03 Jun 2011 09:03:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Find your Files]]></title>
      <guid>http://www.phpdeveloper.org/news/14397</guid>
      <link>http://www.phpdeveloper.org/news/14397</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has a new post today about an update he's made to an aging bit of code for the Symfony framework to <a href="http://fabien.potencier.org/article/43/find-your-files">find files on the local filesystem</a> - sfFinder.
</p>
<blockquote>
I used the opendir, readdir, and closedir  native PHP functions, and it did the job quite well. The PHP class was named sfFinder, and it can still be found in all symfony versions. Even if the class is bundled with symfony, I know that a few people use it for all kind of stuff, not necessarily related to symfony. But the code starts to show its age; first because I learned a lot since then about PHP, and also because there is a better way now. Enter <a href="http://www.php.net/manual/en/spl.iterators.php">iterators</a>!
</blockquote>
<p>
He shows an example of how to use Iterators to search through directories recursively (RecursiveDirectoryIterator) and locate a certain filename. He also looks at making it more OOP and including filtering to remove files from the search. He's packaged up some of this logic into a new Symfony component - the Finder component - that can be used to locate files in a path, be restricted to a depth for the search, match regular expressions file names, filter by file size and much more.
</p>
<p>
If you'd like to dig into the code, check out <a href="http://github.com/symfony/symfony/tree/master/src/Symfony/Components/Finder/">this page</a> on github for this new component (PHP 5.3 only).
</p>]]></description>
      <pubDate>Thu, 22 Apr 2010 14:45:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Federico Cargnelutti's Blog: Implementing Dynamic Finders and Parsing Method Expressions]]></title>
      <guid>http://www.phpdeveloper.org/news/14235</guid>
      <link>http://www.phpdeveloper.org/news/14235</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Federico Cargnelutti</i> takes a look at features available in Ruby and Grails - <a href="http://blog.fedecarg.com/2010/03/22/implementing-dynamic-finders-and-parsing-method-expressions/">dynamic finders and method expressions</a> and introduces a PHP library that can parse them.
</p>
<blockquote>
A dynamic finder method looks like a normal method invocation, but the method itself doesn't exist, instead, the method is generated dynamically and processed via another method at runtime. [...] A method expression is made up of the prefix such as "findBy" followed by an expression that combines one or more properties.
</blockquote>
<p>
He includes a few examples of each, the finders and expressions, and talks about the class he's developed to handle the method expressions in PHP. It's based on a simple format defining the method, attribute, expression and operator. Code snippet examples are included for SQL statement generation and object parsing. The code for the class is included in the post.
</p>]]></description>
      <pubDate>Tue, 23 Mar 2010 13:07:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Zipline Interactive Updates PHP Function Finder (Windows Gadget)]]></title>
      <guid>http://www.phpdeveloper.org/news/9646</guid>
      <link>http://www.phpdeveloper.org/news/9646</link>
      <description><![CDATA[<p>
<i>Ryan</i> from Zipline Interactive submitted an update about the latest version of their "Function Finder" they've created for Windows (and is mentioned <a href="http://us2.php.net/sidebars.php">here</a>):
</p>
<blockquote>
Zipline Interactive has released the second version of their free PHP Function Finder Gadget for Windows Vista.  The tool can be downloaded directly from the Zipline Interactive website at: <a href="http://www.gozipline.com/23,phpfunctionfindergadget">http://www.gozipline.com/23,phpfunctionfindergadget</a>. You can also download the latest version by going to the PHP.net website sidebar page located at: <a href="http://www.php.net/sidebars">http://www.php.net/sidebars</a>.
</blockquote>
<p>
This new version is quite a bit smaller (physically) than its predecessors and is rectangular so it fits a bit better alongside other gadgets. They also fixed a bug that was causing a blink to happen when the search was performed.
</p>
<p>
Grab this latest <a href="http://www.gozipline.com/23,phpfunctionfindergadget">download here</a>.
</p>]]></description>
      <pubDate>Fri, 15 Feb 2008 12:59:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Wide Finder in...errr...PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8948</guid>
      <link>http://www.phpdeveloper.org/news/8948</link>
      <description><![CDATA[<p>
In a <a href="http://www.sitepoint.com/blogs/2007/11/01/wide-finder-in-errr-php/">new post</a> on the SitePoint PHP blog today, <i>Harry Fuecks</i> has created a "wide finder" based on <a href="http://www.tbray.org/ongoing/When/200x/2007/09/20/Wide-Finder">a project</a> put together by <i>Tim Bray</i>.
</p>
<blockquote>
Tim set a simple, but very much real-world challenge; write an app that determines the top 10 most popular blogs from his Apache access log. It should be fast and readable, with a subtext of illustrating how "language X" copes in terms of parallel processing and utilizing "wider" (many processor) systems.
</blockquote>
<p>
Since PHP natively doesn't support multi-threading (well), <i>Harry</i> opted to go with an approach using <a href="http://www.php.net/manual/en/function.curl-multi-exec.php">curl_multi_exec</a> instead. There's two pieces to the puzzle - the mapper to grab the information and extract the data and the reducer that makes the calls to grab the information from the log files.
</p>]]></description>
      <pubDate>Thu, 01 Nov 2007 08:24:00 -0500</pubDate>
    </item>
  </channel>
</rss>
