<?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 - php5</title>
  <link>http://mirmodynamics.com/</link>
  <atom:link href="http://mirmodynamics.com/feed/tag/php5/rss2" rel="self" type="application/rss+xml"/>
  <description>Si tu kiffes pas reunoi, t'écoutes pas et puis c'est tout.</description>
  <language>en</language>
  <pubDate>Sun, 14 Mar 2010 19:59:01 +0100</pubDate>
  <copyright>2003-2009 &amp;copy; Geoffrey Bachelet</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Zend engineer certification, I has it</title>
    <link>http://mirmodynamics.com/post/2008/03/21/Zend-engineer-certification-I-has-it</link>
    <guid isPermaLink="false">urn:md5:14a666c54361d69a595c312eb60552be</guid>
    <pubDate>Fri, 21 Mar 2008 13:03:00 +0100</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Ego</category>
        <category>certification</category><category>php5</category><category>zend</category>    
    <description>    &lt;p&gt;Just a quick note to say I successfuly passed &lt;a href=&quot;http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND007432&amp;amp;RegistrationID=224692189&quot;&gt;my Zend PHP 5 Certification&lt;/a&gt; this morning.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2008/03/21/Zend-engineer-certification-I-has-it#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2008/03/21/Zend-engineer-certification-I-has-it#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1088</wfw:commentRss>
      </item>
    
  <item>
    <title>Extending Zend_Controller_Router_Route: the singleton problem.</title>
    <link>http://mirmodynamics.com/post/2007/11/05/Extending-Zend_Controller_Router_Route%3A-the-singleton-problem</link>
    <guid isPermaLink="false">urn:md5:639fef9d7c01edc0e63ee3f2c2a5c823</guid>
    <pubDate>Mon, 05 Nov 2007 14:37:00 +0100</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Coding</category>
        <category>annoying</category><category>dry</category><category>oop</category><category>pattern</category><category>php5</category><category>route</category><category>self</category><category>singleton</category><category>zend framework</category>    
    <description>    &lt;p&gt;Today I ran into an issue while extending &lt;code&gt;Zend_Controller_Router_Route&lt;/code&gt;. I wanted to add a little path pre/post processing in the &lt;code&gt;match()&lt;/code&gt; and &lt;code&gt;assemble()&lt;/code&gt; methods, so I just extended the Route class to add my tiny bits of code into the methods. Except it did not work at all. After a few debuging, it turned out that the Router uses &lt;code&gt;Zend_Controller_Router_Route::getInstance()&lt;/code&gt; to retrieve a route object, which uses a &lt;code&gt;new self();&lt;/code&gt; statement to instantiate the route object. Problem is that &lt;code&gt;self&lt;/code&gt; always refers to the current class definition we're in, if the method is called from a child class, without being overloaded, self will refer to the wrong class.&lt;/p&gt;


&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;
[php]
class Foo {
	public static function getInstance() {
		return new self;
	}
}

class Bar extends Foo {}

var_dump(Bar::getClass());
&lt;/pre&gt;


&lt;p&gt;echoes something like:&lt;/p&gt;

&lt;pre&gt;
object(Foo)#1 (0) {
}
&lt;/pre&gt;


&lt;p&gt;Which is fscking wrong IMHO. A quick workaround is to overload the &lt;code&gt;getInstance&lt;/code&gt; method, which is what I call pretty annoying as it does not follow the DRY principle.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/11/05/Extending-Zend_Controller_Router_Route%3A-the-singleton-problem#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/11/05/Extending-Zend_Controller_Router_Route%3A-the-singleton-problem#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1072</wfw:commentRss>
      </item>
    
  <item>
    <title>Quick php5 pre-migration check</title>
    <link>http://mirmodynamics.com/post/2007/08/30/Quick-php5-pre-migration-check</link>
    <guid isPermaLink="false">urn:md5:2e44d92a67a44664619078b9766c1b5f</guid>
    <pubDate>Thu, 30 Aug 2007 11:57:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Geekeries</category>
        <category>migration</category><category>php</category><category>php5</category><category>quick</category><category>syntax check</category><category>tips</category>    
    <description>    &lt;p&gt;If you're wondering how much of a hassle it would be to migrate your app / codebase to php5, try the following command line (after having installed the php5-cli package of course):&lt;/p&gt;


&lt;pre&gt;find . -name &amp;quot;*.php&amp;quot; -exec /usr/bin/php5 -l {} \; | grep -v 'No syntax errors'&lt;/pre&gt;


&lt;p&gt;It'll show you all the files with syntax errors in it.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2007/08/30/Quick-php5-pre-migration-check#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2007/08/30/Quick-php5-pre-migration-check#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1006</wfw:commentRss>
      </item>
    
</channel>
</rss>