<?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, 23 May 2013 12:31:05 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)]]></title>
      <guid>http://www.phpdeveloper.org/news/16984</guid>
      <link>http://www.phpdeveloper.org/news/16984</link>
      <description><![CDATA[<p>
<i>Till Klampaeckel</i> has a new post today looking at a solution for a common need - <a href="http://till.klampaeckel.de/blog/archives/166-Iterating-over-a-table-with-Zend_Db_Table-and-Zend_Paginator.html">paginating through results</a> as pulled from a database. With the help of the Zend_Db_Table and Zend_Paginator components of the <a href="http://framework.zend.com">Zend Framework</a> it's a simple matter of passing the results into the Paginator and asking for a certain page.
</p>
<blockquote>
So frequently, I need to run small data migrations or transformations. Especially on the way to Doctrine, there's a lot to clean-up in a database which has been used and evolved over five years or so.
</blockquote>
<p>
Code snippets are included to define a class for the table, extending Zend_Db_Table_Abstract, and a new Zend_Paginator_Adapter_DbTableSelect object to create the paginated results. After that, it's as simple as setting the number of items per page and asking for a certain page. There's even a quick bit about being able to edit the rows inside the paginator directly (they're just Zend_Db_Table_Row records).
</p>]]></description>
      <pubDate>Wed, 12 Oct 2011 11:01:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ralph Schindler's Blog: Composite Rowsets For Many-To-Many Relationships Via Zend_Db_Table]]></title>
      <guid>http://www.phpdeveloper.org/news/15438</guid>
      <link>http://www.phpdeveloper.org/news/15438</link>
      <description><![CDATA[<i>Ralph Schindler</i> has <a href="http://ralphschindler.com/2010/11/15/composite-rowsets-for-many-to-many-relationships-via-zend_db_table">posted a handy tutorial</a> (along with some helpful code) to his blog today about handling many-to-many composite rowset  relationships with the Zend_Db component of the Zend Framework.
</p>
<blockquote>
One of the hardest problems to solve when developing an ORM of any complexity is in deciding how to handle the retrieval of rows that satisfy a <a href="http://en.wikipedia.org/wiki/Many-to-many_(data_model)">many-to-many relationship</a>, also known as a M:N relationship. [...] To model M:N relationships, database developers must get creative. By employing the use of a "3rd party", and by utilizing foreign keys that model a 1:N relationship, database developers can model a M:N relationship. 
</blockquote>
<p>
He looks at the Zend_Db_Table_Row class of the framework and how it works with these junction tables and how it has <a href="http://framework.zend.com/issues/browse/ZF-6232">an issue</a> where it returns the junction table columns too. A fix was released (in 1.10.2) for the framework to work correctly. Unfortunately, this also left those using the method out in the cold. So, <i>Ralph</i> has <a href="https://github.com/gooeylabs/Gooey-PHP-5.2-Components">created his own workaround</a> called a composite rowset. He includes an example snippet to give you an idea of how it works, but you can download the code from <a href="https://github.com/gooeylabs/Gooey-PHP-5.2-Components">his github repository</a> for a closer look.
</p>]]></description>
      <pubDate>Tue, 16 Nov 2010 11:08:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Metadata from Zend_Db_Table_Abstract]]></title>
      <guid>http://www.phpdeveloper.org/news/12598</guid>
      <link>http://www.phpdeveloper.org/news/12598</link>
      <description><![CDATA[<p>
As a part of his WinPHP Challenge project <i>Rob Allen</i> has <a href="http://akrabat.com/2009/05/28/metadata-from-zend_db_table_abstract/">come up with a method</a> to combing the Zend_Db_Table component of the Zend Framework with the SuccessSQL tool to extract the table information directly from the database.
</p>
<blockquote>
Zend_Db_Table provides all this information directly which is quite useful, however the intended use-case for Zend_Db_Table is that you extend Zend_Db_Table_Abstract for each table that you want to interact with. Obviously, SuccesSQL doesn't know in advance the names of the tables, so I created a stub class that allowed me to instantiate a Zend_Db_Table dynamically.
</blockquote>
<p>
A few code snippets later and he has a working example showing a <a href="http://php.net/var_dump">var_dump</a> of the object's output - complete with full data for the two columns - ID and artist.
</p>]]></description>
      <pubDate>Mon, 01 Jun 2009 07:53:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials: Zend Framework Tutorial]]></title>
      <guid>http://www.phpdeveloper.org/news/10827</guid>
      <link>http://www.phpdeveloper.org/news/10827</link>
      <description><![CDATA[<p>
On the Developer Tutorials site there's a <a href="http://www.developertutorials.com/tutorials/php/zend-framwork-tutorial-8-08-13/page1.html">new tutorial</a> providing an introduction to the popular PHP framework, the <a href="http://framework.zend.com">Zend Framework</a>.
</p>
<blockquote>
I find myself constantly bombarded with questions from students and co-workers I've introduced to the Zend Framework regarding how the different components can come together to form a basic application. I've searched, I have found, I have emailed great tutorials, but still the most common questions are posed "What's should I include in index.php?", "Should I use Zend_Db_Table?", "And what about Zend_Form?"
</blockquote>
<p>
It gives the usual overview of setting up an application and how its all structured but it also includes a specific look at the Zend_Form, Zend_Db_Table, Zend_Registry and Zend_Cache components.
</p>]]></description>
      <pubDate>Thu, 14 Aug 2008 07:52:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ivan Iordanov's Blog: extending Zend_Db_Table to create NestedSet models]]></title>
      <guid>http://www.phpdeveloper.org/news/10618</guid>
      <link>http://www.phpdeveloper.org/news/10618</link>
      <description><![CDATA[<p>
<i>Ivan Iordanov</i> has <a href="http://dev.iordanov.net/archives/8">posted a method</a> he's come up with to extend the existing Zend_Db_Table functionality (of the <a href="http://framework.zend.com">Zend Framework</a>) to create NestedSet models for your app.
</p>
<blockquote>
Last days I've been trying to customize Zend's Framework. My goal is to create simpler models. Currently I'm making some db models that handle stuff around wide used designs. Such design is the Nested Set model. It is an adjacent list realized in SQL as a tree. You can find a <a href="http://dev.mysql.com/tech-resources/articles/hierarchical-data.html">good introduction</a> to nested sets at <a href="http://dev.mysql.com/">mysql developer zone</a>.
</blockquote>
<p>
He steps through the creation of some example database tables, his class and controller to hook into the Zend Framework application and this <a href="http://dev.iordanov.net/archives/8">full code</a> for his interface class to make the NestedSet models easy.
</p>]]></description>
      <pubDate>Wed, 16 Jul 2008 11:17:19 -0500</pubDate>
    </item>
  </channel>
</rss>
