<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://mirmodynamics.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Mirmo Dynamics - Tag - proxy</title>
  <link>http://mirmodynamics.com/</link>
  <atom:link href="http://mirmodynamics.com/feed/tag/proxy/rss2" rel="self" type="application/rss+xml"/>
  <description>Rien de grand ne se fit jamais sans enthousiasme.</description>
  <language>en</language>
  <pubDate>Wed, 03 Dec 2008 17:01:33 +0100</pubDate>
  <copyright>2003-2008 &amp;copy; Geoffrey Bachelet</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Zend Framework Pagination reloaded</title>
    <link>http://mirmodynamics.com/post/2007/07/31/Zend-Framework-Pagination-reloaded</link>
    <guid isPermaLink="false">urn:md5:ff2795a69d87c7651a3e739a14720d82</guid>
    <pubDate>Tue, 31 Jul 2007 11:33:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Coding</category>
        <category>pagination</category><category>pattern</category><category>php</category><category>proxy</category><category>zend framework</category><category>zend_db_table</category>    
    <description>    &lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://fashion.hosmoz.net/post/2007/09/23/Zend-Framework-Pagination-third-strike&quot;&gt;A new version of this component is available&lt;/a&gt;.&lt;/p&gt;



&lt;p&gt;I have a &lt;a href=&quot;http://svn.riskle.com/library/Riskle/Db/Table/Paginate.php&quot;&gt;new version of my pagination component&lt;/a&gt; which solve &lt;a href=&quot;http://fashion.hosmoz.net/post/2007/07/15/Pagination-with-the-Zend-Framework#c2757&quot;&gt;the issue previously pointed out&lt;/a&gt; by &lt;a href=&quot;http://totalement.geek.oupas.fr/&quot;&gt;Guy&lt;/a&gt;. This update comes along with &lt;a href=&quot;http://svn.riskle.com/library/Riskle/Db/Table.php&quot;&gt;a subclassed version of Zend_Db_Table&lt;/a&gt; which allows counting and specific columns selection respectively via the &lt;code&gt;fetchCount()&lt;/code&gt; and &lt;code&gt;fetchCols()&lt;/code&gt; methods. Btw, the &lt;code&gt;fetchCols()&lt;/code&gt; method is &lt;strong&gt;very&lt;/strong&gt; hackish at the moment, and I'll certainly end up with rewriting it using a plain &lt;code&gt;Zend_Db_Select&lt;/code&gt; statement.&lt;/p&gt;


&lt;p&gt;As always, any comment is appreciated. I'm thinking of subclassing the Rowset class to fill it with pagination info getters like &lt;code&gt;getPageCount()&lt;/code&gt;, &lt;code&gt;getNextPage()&lt;/code&gt;, etc, like in &lt;em&gt;Symfony&lt;/em&gt; for those knowing, instead of relying on a &lt;code&gt;getPaginationInfo()&lt;/code&gt; method. Future improvements will also include more view helper magic.&lt;/p&gt;


&lt;p&gt;Also, I came up with a small new &lt;code&gt;Riskle_Pattern&lt;/code&gt; namespace which I use to &lt;a href=&quot;http://svn.riskle.com/library/Riskle/Pattern/Proxy.php&quot;&gt;implement commonly used patterns&lt;/a&gt;, such as the &lt;a href=&quot;http://en.wikipedia.org/wiki/Proxy_pattern&quot;&gt;Proxy Pattern&lt;/a&gt;. I'm not yet sure of the pertinence of this thing, so any comments are yet again very much appreciated on this topic :-)&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/07/31/Zend-Framework-Pagination-reloaded#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/07/31/Zend-Framework-Pagination-reloaded#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/909</wfw:commentRss>
      </item>
    
  <item>
    <title>Pagination with the Zend Framework</title>
    <link>http://mirmodynamics.com/post/2007/07/15/Pagination-with-the-Zend-Framework</link>
    <guid isPermaLink="false">urn:md5:37f240d9a3578a1a954158eb14a63b40</guid>
    <pubDate>Sun, 15 Jul 2007 11:38:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Coding</category>
        <category>design pattern</category><category>pagination</category><category>php</category><category>proxy</category><category>view helper</category><category>zend framework</category><category>zend_db_table</category>    
    <description>    &lt;p&gt;Yesterday I came up with a small pagination component for the Zend Frameworks. It implements the &lt;a href=&quot;http://en.wikipedia.org/wiki/Proxy_pattern&quot;&gt;Proxy pattern&lt;/a&gt; around a &lt;code&gt;Zend_Db_Table&lt;/code&gt; object, and overloads the &lt;code&gt;fetchAll&lt;/code&gt; method. The main problem I encountered here was to retrieve the total number of rows for the table. I'm using a &lt;code&gt;Zend_Db_Select&lt;/code&gt; query for now, but I'll have to improve that. The component also features a view helper to draw the pagination links.&lt;/p&gt;


&lt;p&gt;You'll find the code for the &lt;a href=&quot;http://svn.riskle.com/library/Riskle/Db/Table/Paginate.php&quot;&gt;component&lt;/a&gt; and the &lt;a href=&quot;http://svn.riskle.com/library/Riskle/View/Helper/Paginate.php&quot;&gt;view helper&lt;/a&gt; on my &lt;acronym&gt;SVN&lt;/acronym&gt;.&lt;/p&gt;


&lt;p&gt;And here is how it is used in the controller:&lt;/p&gt;

&lt;pre&gt;
    public function indexAction() {
        $urls = new Riskle_Db_Table_Paginate(new Urls, $this-&amp;gt;_getParam('page'));
        $this-&amp;gt;view-&amp;gt;urlsList = $urls-&amp;gt;fetchAll(null, 'datetime DESC');
        $this-&amp;gt;view-&amp;gt;paginationInfos = $urls-&amp;gt;getPaginationInfos();
    }
&lt;/pre&gt;


&lt;p&gt;The view helper takes &lt;code&gt;paginationInfos&lt;/code&gt; as an argument:&lt;/p&gt;

&lt;pre&gt;
echo $this-&amp;gt;paginate($this-&amp;gt;paginationInfos);
&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;As pointed out by &lt;a href=&quot;http://totalement.geek.oupas.fr/&quot;&gt;Guy&lt;/a&gt;, the &lt;code&gt;_getPageCount&lt;/code&gt; method does not actually takes care of the &lt;code&gt;$where&lt;/code&gt; condition, thus rendering the class inefficient as getting the real totel number of items. This issue will be adressed in an upcoming version of the class :-)&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;There's an &lt;a href=&quot;http://fashion.hosmoz.net/post/2007/07/31/Zend-Framework-Pagination-reloaded&quot;&gt;updated version of this component&lt;/a&gt; available.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/07/15/Pagination-with-the-Zend-Framework#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/07/15/Pagination-with-the-Zend-Framework#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/889</wfw:commentRss>
      </item>
    
  <item>
    <title>SVN: MKACTIVITY Could not parse response status line.</title>
    <link>http://mirmodynamics.com/post/2007/04/15/SVN%3A-MKACTIVITY-Could-not-parse-response-status-line</link>
    <guid isPermaLink="false">urn:md5:1012a9135b8196acf0158d277f4f6e09</guid>
    <pubDate>Sun, 15 Apr 2007 21:59:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Geekeries</category>
        <category>bug</category><category>mkactivity</category><category>proxy</category><category>squid</category><category>svn</category>    
    <description>    &lt;p&gt;Un petit billet pour un problème qui ne bénéficie que d'une faible visibilité sur google. Si votre client &lt;acronym&gt;SVN&lt;/acronym&gt; vous jette avec un message du genre:&lt;/p&gt;


&lt;pre&gt;svn: MKACTIVITY de '/pwnd/!svn/act/a4eec923-2c2e-0410-a786-c01cbd856e8f': Could not parse response status line. (http://svn.phpmafia.net)&lt;/pre&gt;


&lt;p&gt;Vérifiez que vous n'êtes pas derrière un proxy, ça peut venir de là.&lt;/p&gt;


&lt;p&gt;cf: &lt;a href=&quot;http://devjavu.jellybb.com/viewtopic.php?id=60&quot;&gt;DevjaVu Forums&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/04/15/SVN%3A-MKACTIVITY-Could-not-parse-response-status-line#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/04/15/SVN%3A-MKACTIVITY-Could-not-parse-response-status-line#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/759</wfw:commentRss>
      </item>
    
</channel>
</rss>