<?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>Tue, 21 May 2013 16:15:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Code Generation with ZendCodeGenerator]]></title>
      <guid>http://www.phpdeveloper.org/news/16108</guid>
      <link>http://www.phpdeveloper.org/news/16108</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has put together <a href="http://weierophinney.net/matthew/archives/261-Code-Generation-with-ZendCodeGenerator.html">a beginners guide to code generation</a> with the help of the Zend_CodeGenerator component of the Zend Framework (v2):
</p>
<blockquote>
Zend Framework has offerred a code generation component since version 1.8, when we started shipping Zend_Tool. Zend_CodeGenerator largely mimics PHP's ReflectionAPI, but does the opposite: it instead generates code. [...] ZendCodeGenerator in the ZF2 repository is largely ported from Zend Framework 1, but also includes some functionality surrounding namespace usage and imports.
</blockquote>
<p>
He includes an overview of the different code generation classes available (like PhpBody, PhpFile, PhpProperty, etc) and a bit of code to show you how to create a skeleton class that includes namespace use, class definition and the addition of a "get" method. He also offers some "tips" and "gotchas" to watch out for your first time around like the helpful automagic getter and setter handling.
</p>]]></description>
      <pubDate>Mon, 28 Mar 2011 10:40:29 -0500</pubDate>
    </item>
  </channel>
</rss>
