<?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>Wed, 16 May 2012 22:43:48 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Marcus Bointon's Blog: Compiling wkhtmltopdf on Mac OS X 10.7 Lion]]></title>
      <guid>http://www.phpdeveloper.org/news/17967</guid>
      <link>http://www.phpdeveloper.org/news/17967</link>
      <description><![CDATA[<p>
<i>Marcus Bointon</i> has <a href="http://marcus.bointon.com/compiling-wkhtmltopdf-on-mac-os-x-10-7-lion/">written up the process</a> he took to get the PHP extension for <a href="http://code.google.com/p/wkhtmltopdf/">Wkhtmltopdf</a> (a conversion tool for HTML to PDF generation) up and working on a Mac OSX machine - not as easy a task as it sounds.
</p>
<blockquote>
<a href="http://code.google.com/p/wkhtmltopdf/">Wkhtmltopdf</a> is extremely cool. I've used qtwebkit for generating server-side page images before using <a href="https://github.com/AdamN/python-webkit2png">python-webkit2png</a>, and that's fine (unlike using Firefox running in xvfb!), but I need to produce PDFs. So, I looked around and found several neat, simple PHP wrappers for calling wkhtmltopdf, and even a <a href="https://github.com/mreiferson/php-wkhtmltox">PHP extension</a>. "Great", I thought, "I'll just install that and spend time working on the layouts since the code looks really simple". I spoke too soon.
</blockquote>
<p>
He goes through each step of the process - installing the needed wkhtmltox and libwkhtmltox support, having to manually compile wkhtmltopdf and some of the small changes you'll need to make to the Makefile to get things to cooperate. He shows where to put the resulting application files and the name of the extension to enable in your php.ini.
</p>]]></description>
      <pubDate>Wed, 16 May 2012 11:55:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: Have a 'Strategy']]></title>
      <guid>http://www.phpdeveloper.org/news/17966</guid>
      <link>http://www.phpdeveloper.org/news/17966</link>
      <description><![CDATA[<p>
In response to <a href="http://odino.org/use-the-strategy-to-avoid-the-switch-case-antipattern/">this suggestion</a> from <i>Alessandro Nadalin</i> about using the "Strategy" design pattern to replace a <a href="http://php.net/switch">switch</a. statement, <i>Chris Hartjes</i> has <a href="http://www.littlehart.net/atthekeyboard/2012/05/15/have-a-strategy/">this new post</a> sharing his opinion of "the right way" do it it.
</p>
<blockquote>
Once I realized what he was doing, I realized that the Strategy pattern was applicable in this case…but his chosen example was dumb and one that I wouldn't have used to demonstrate things. As expected, he told me to supply a sample of a better way. I did, telling him that the sample would be better if he didn't mash the logging level together with the message.
</blockquote>
<p>
Included in the post is sample code, first showing the initial version of the logging class, complete with accompanying tests. Following that, he shows how to refactor it into something using the Strategy pattern, replacing the logging type switch statement with protected methods for each logging message type (critical, notice, etc). 
</p>]]></description>
      <pubDate>Wed, 16 May 2012 10:42:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: Symfony Community Survey 2012]]></title>
      <guid>http://www.phpdeveloper.org/news/17965</guid>
      <link>http://www.phpdeveloper.org/news/17965</link>
      <description><![CDATA[<p>
The Symfony Project is <a href="http://symfony.com/blog/symfony-community-survey-2012">running a community survey</a> for developers using the framework. It asks some generic questions including "how long have you been working with Symfony?" and "how did you get to know Symfony?"
</p>
<blockquote>
Symfony 2.0 has been released for quite a long time now, and so we would like to conduct a quick survey to get a better understanding of the Symfony community. I'm going to use some of the aggregated results for my Symfony Live <a href="http://paris2012.live.symfony.com/">keynote</a>, and all the aggregated results will be published on this blog after the conference.
</blockquote>
<p>
If you're a SenseioLabs Connect user, you can also get a badge for participating and will be included in a giveaway for tshirts and hats.
</p>]]></description>
      <pubDate>Wed, 16 May 2012 09:05:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: AtlantaPHP June Meetup - Introduction to Laravel ]]></title>
      <guid>http://www.phpdeveloper.org/news/17964</guid>
      <link>http://www.phpdeveloper.org/news/17964</link>
      <description><![CDATA[<p>
The Atlanta PHP User Group has announced their latest meeting for June 2012 - an <a href="http://atlantaphp.org/2012/05/june-2012-meeting/">introduction to the Larvel framework</a> from <i>Ben Edmunds</i>.
</p>
<blockquote>
Are you ashamed to admit you're a PHP developer? Have you been using the same old, boring PHP framework for years? Tired of your PHP applications turning into enormous beasts? Maybe you've heard about <a href="http://laravel.com/">Laravel</a> but haven't made the effort to dive into it? In this presentation, we'll walk through what makes Laravel an elegant, fun, and exciting framework to make PHP applications that you'll be proud of.
</blockquote>
<p>
The meeting is happening June 7th at 7pm at the <a href="http://atlantaphp.org/directions/">Strongbox West</a> on Defoor Place. Food will be provided and there'll be giveaways of AtlantaPHP and Laravel swag!
</p>
<p>
Have a user group meeting coming up you'd like posted? <a href="mailto:info@phpdeveloper.org">send it over</a> and we'll get it posted!
</p>]]></description>
      <pubDate>Wed, 16 May 2012 08:25:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Latest Releases from PHPClasses.org]]></title>
      <guid>http://www.phpdeveloper.org/news/17963</guid>
      <link>http://www.phpdeveloper.org/news/17963</link>
      <description><![CDATA[<ul><li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/7bqfmTv_Vwc/7485-PHP-Store-values-in-cache-with-underflow-and-overflow.html">Item Cache</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/5DdkY6TOtmY/7498-PHP-Insert-Facebook-social-plugins-in-Web-pages.html">Facebook Plugin</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/7bqfmTv_Vwc/7485-PHP-Store-values-in-cache-with-underflow-and-overflow.html">itemCache</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/Nzj7l0gPpYI/7496-PHP-Execute-common-MySQL-queries-from-parameter-values.html">Wallfa Database </a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/FuyFxpOG9L8/7488-PHP-Encode-and-decode-text-switching-characters.html">Byte Run</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/lelbvnDqPhc/7497-PHP-Format-text-with-BBCode-tags-as-HTML.html">PHP BBCode</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/ryYdifz7r8M/7495-PHP-Validate-forms-with-rules-defined-in-form-template.html">jForm Validator</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/ryYdifz7r8M/7495-PHP-Validate-forms-with-rules-defined-in-form-template.html">jForm-validator</a>
<li><a href="http://feedproxy.google.com/~r/phpclasses-xml/~3/_LD8TDV36Q4/7494-PHP-Generate-a-sitemap-from-lists-of-URLs.html">My Sitemap Generator</a>
</ul>]]></description>
      <pubDate>Wed, 16 May 2012 07:08:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Using SPL Iterators, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17962</guid>
      <link>http://www.phpdeveloper.org/news/17962</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial posted, the first part of a series, looking at the use of the <a href="http://php.net/spl">Standard PHP Library (SPL)</a> in PHP. In <a href="http://phpmaster.com/using-spl-iterators-1/">this first part</a> of the series, <i>Stefan Froelich</i> looks specifically at two of the more common uses for iterators - working with arrays and directories.
</p>
<blockquote>
When I first came across the term iteration and saw the overwhelming list of classes related to it in the SPL, I was taken aback. It seemed maybe iteration was too complex for me to grasp. I soon realized it was just a fancy word for something we programmers do all the time. [...] In the first part of this two-part series I'll introduce you to iteration and how you can take advantage of some of the built-in classes from the Standard PHP Library (SPL).
</blockquote>
<p>
Included in the tutorial is example code showing how to use the <a href="http://php.net/arrayiterator">ArrayIterator</a> to work with an array and the <a href="http://php.net/directoryiterator">DirectoryIterator</a> to process the contents of a directory. He also briefly touches on a few other iterators like "FileExtensionFilter", "RecursiveDirectoryIterator" and "RecursiveArrayIterator".
</p>]]></description>
      <pubDate>Tue, 15 May 2012 12:26:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Form Mastery with Zend_Config - Part 2, Core Form Configuration]]></title>
      <guid>http://www.phpdeveloper.org/news/17961</guid>
      <link>http://www.phpdeveloper.org/news/17961</link>
      <description><![CDATA[<p>
In his <a href="http://phpdeveloper.org/news/17880">previous post</a> to the MaltBlue.com blog <i>Matt</i> introduced the concept of configuration-driven Zend_Form instances. He's back with a <a href="http://www.maltblue.com/zend-form/zend-form-mastery-with-zend-config-part-2-core-form-configuration">second part to the series</a>, enhancing his original examples by covering some of the base-level form configuration settings.
</p>
<blockquote>
Ok, this should have been part one, but irrespective, here's the second installment in zend form mastery with zend config - core form configuration. As <a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.3">the W3c Form spec</a> says, there are 8 attributes applicable to forms.
</blockquote>
<p>
These attributes, including "action", "name" and "onsubmit", can all be set easily in the XML-based configuration file. He includes an example of the full XML file to show how they all fit together (updated from <a href="http://www.maltblue.com/zend-framework/zend-form-mastery-with-zend-config-part-1-custom-filter-paths">part 1</a>).  You can see an example of the output <a href="http://www.maltblue.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-11.12.44.png">here</a> and can grab the source for the example <a href="https://github.com/maltblue/Zend-Framework-Learning-Modules#zend-framework-learning-modules">from github</a>.
</p>]]></description>
      <pubDate>Tue, 15 May 2012 11:04:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sean Coates' Blog: PHP as a templating language]]></title>
      <guid>http://www.phpdeveloper.org/news/17960</guid>
      <link>http://www.phpdeveloper.org/news/17960</link>
      <description><![CDATA[<p>
In <a href="http://seancoates.com/blogs/php-as-a-templating-language">this new post</a> to his blog <i>Sean Coates</i> talks about PHP as a templating language and why he (and <a href="http://gimmebar.com">Gimmebar</a>) have decided to go another, more frontend-based direction.
</p>
<blockquote>
For many years, I was a supporter of using PHP as a templating language to render HTML. However, I really don't buy into the idea of adding an additional abstraction layer on top of PHP, such as <a href="http://smarty.php.net/">Smarty</a> (and many others). In the past year or so, I've come to the realization that even PHP itself is no longer ideally suited to function as the templating engine of current web applications - at least not as the primary templating engine for such apps.
</blockquote>
<p>
His reasoning is pretty simple - more and more web applications are becoming less and less server-driven. When building applications (and APIs) you don't know how the data will be consumed, so your frontend has to be agnostic. So, what's his current alternative of choice? The <a href="http://mustache.github.com/">Mustache</a> templating framework provides a simple way to create reusable templates (along with the compatible <a href="http://handlebarsjs.com/">Handlebars</a> Javascript library).
</p>]]></description>
      <pubDate>Tue, 15 May 2012 10:58:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: Sami: Yet another PHP API documentation generator]]></title>
      <guid>http://www.phpdeveloper.org/news/17959</guid>
      <link>http://www.phpdeveloper.org/news/17959</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has <a href="http://fabien.potencier.org/article/63/sami-yet-another-php-api-documentation-generator">released a new tool</a> to the open source community today - a documentation generation tool called <a href="https://github.com/fabpot/Sami">Sami</a>.
</p>
<blockquote>
Nowadays, <a href="http://phpdoc.org/">phpDocumentor</a> version 2 is probably the best option out there as it has a good architecture, it works fine, it is extensible, and quite a few big PHP projects is already using it. And that's fine. I don't want to compete with it, I don't want to replace it, I'm just open sourcing some code used by <a href="http://api.symfony.com/">Symfony</a>, <a href="http://silex.sensiolabs.org/api/index.html">Twig</a>, and <a href="http://silex.sensiolabs.org/api/index.html">Silex</a> because I'm not comfortable with closed-source software. And to be totally honest and transparent, I have not released the code before because it was not "good enough".
</blockquote>
<p>
He gives an example of how to install and use <a href="https://github.com/fabpot/Sami">Sami</a> - configuring the directories to parse and setting up a custom theme for the resulting generated documentation (using regular CSS and HTML definitions). 
</p>]]></description>
      <pubDate>Tue, 15 May 2012 09:18:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Voices of the ElePHPant Podcast: Interview with Derick Rethans]]></title>
      <guid>http://www.phpdeveloper.org/news/17958</guid>
      <link>http://www.phpdeveloper.org/news/17958</link>
      <description><![CDATA[<p>
The Voices of the ElePHPant podcast has released their latest episode - an <a href="http://voicesoftheelephpant.com/2012/05/15/interview-with-derick-rethans-2">interview with Derick Rethans</a> of <a href="http://10gen.com">10gen</a> and <a href="http://xdebug.org">XDebug</a> fame.
</p>
<p>
<i>Cal</i>'s "three questions" for <i>Derick</i> involve
</p>
<ul>
<li>How did you come up with the idea and how did the project get started?
<li>What's been the most fun and interesting part about building the community around XDebug?
<li>What's the hardest lesson you've learned about running a project like XDebug?
</ul>
<p>
You can listen to this latest episode either via the <a href="http://voicesoftheelephpant.com/2012/05/15/interview-with-derick-rethans-2">in-page player</a> or by <a href="http://voices.of.the.elephpant.s3.amazonaws.com/vote_052.mp3">downloading the mp3</a> directly. You can also <a href="http://voicesoftheelephpant.com/feed/podcast/">subscribe to their feed</a> to get the latest as they're released.
</p>]]></description>
      <pubDate>Tue, 15 May 2012 08:22:31 -0500</pubDate>
    </item>
  </channel>
</rss>

