<?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, 24 May 2012 06:02:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: In My Language, Please! - Translating WordPress Themes and Plugins]]></title>
      <guid>http://www.phpdeveloper.org/news/17852</guid>
      <link>http://www.phpdeveloper.org/news/17852</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial showing how to <a href="http://phpmaster.com/in-my-language-please/">use the localization support</a> that comes with WordPress to make using different language definitions much simpler.
</p>
<blockquote>
WordPress itself is translated to many languages and people can use it in their preferred language. But this is not the case with themes, plugins, and other front-end customizations. [...] The purpose of this article is to show you how to translate properly any theme or plugin by using internationalization and localization methods. In brief, internationalization (i18n) deals with making sure strings of text are wrapped in specific function calls. 
</blockquote>
<p>
He starts by introducing the PHP functions (and configuration) you'll need to get the localization support up and running in your plugin, including a few examples of how to translate a string. Also included into the post is an introduction to using the <a href="http://www.poedit.net/">Poedit</a> software to create the different translation files.
</p>]]></description>
      <pubDate>Mon, 23 Apr 2012 12:27:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Handling Plugins In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17654</guid>
      <link>http://www.phpdeveloper.org/news/17654</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post today looking at <a href="http://blog.ircmaxell.com/2012/03/handling-plugins-in-php.html">plugin handling</a> and a few of the more common design patterns that can be used to implement them in your applications.
</p>
<blockquote>
A common problem that developers face when building applications is how to allow the application to be "plug-able" at runtime.  Meaning, to allow non-core code to modify the way an application is processed at runtime.  There are a lot of different ways that this can be done, and lots of examples of it in real life.  Over a year ago, I wrote a <a href="http://stackoverflow.com/a/4471363/338665">StackOverflow Answer</a> on this topic.  However, I think it deserves another look.  So let's look at some patterns and common implementations.
</blockquote>
<p>The patterns he covers are:</p>
<ul>
<li>Observer
<li>Mediator
<li>Strategy
<li>Decorator
<li>Chain of Responsibility
</ul>
<p>
For each there's both a bit of sample code showing it in use and links to some examples from various frameworks and other projects.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2012 13:34:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Writing Unit Tests For WordPress Plugins]]></title>
      <guid>http://www.phpdeveloper.org/news/17652</guid>
      <link>http://www.phpdeveloper.org/news/17652</link>
      <description><![CDATA[<p>
On the Smashing Magazine site there's a recent post looking at how to <a href="http://coding.smashingmagazine.com/2012/03/07/writing-unit-tests-for-wordpress-plugins/">unit test WordPress plugins</a> via the frontend using <a href="http://docs.jquery.com/QUnit">QUnit</a> (part of the <a href="http://jquery.com">jQuery</a> project).
</p>
<blockquote>
My first goal for the WordPress Editorial Calendar was to make it do anything useful. I was new to JavaScript and PHP and didn't really know what I could pull off. In a few days I had a proof of concept. In a few more I had a working version and was asking friends to install it. The calendar worked...sort of. I spent three times as much time fixing bugs as I did coding. Once the plugin worked, I wrote unit tests to make sure it kept working.
</blockquote>
<p>
He introduces the QUnit testing tool and includes some sample tests showing you how to create both a pass/fail and how to test a PHP value passed out to the page via PHP. There's also a section on getting WordPress and QUnit integrated and only executing when there's a "qunit" parameter on the URL. Actual tests for his calendar plugin are included and you can <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal&qunit=true">see the results of the tests here</a>.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2012 10:46:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Setting Up Sublime Text 2 For PHP Development]]></title>
      <guid>http://www.phpdeveloper.org/news/17595</guid>
      <link>http://www.phpdeveloper.org/news/17595</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i>, a big fan of the Sublime Text 2 editor, has <a href="http://blog.stuartherbert.com/php/2012/02/28/setting-up-sublime-text-2-for-php-development/">put together a post</a> showing you what he thinks is an effected way to set up the editor for PHP development.
</p>
<blockquote>
As the interest seems to be there, I thought it would be a great idea to follow up with a post taking you step by step through how I've set up Sublime Text 2 for PHP development, and showing you some of the useful features that you get out of the box with Sublime Text 2.
</blockquote>
<p>
He's come up with some screencasts of his setup so you can see the useful features in action. He points out a few things to install or that use can use to make your development simpler:
</p>
<ul>
<li>Package Control
<li>the Soda theme
<li>how to edit user preferences
<li>using the "Goto Anything" bar
<li>using the PHP snippets plugin
<li>DocBlockr for documentation blocks
<li>Sublime linter
<li>Goto Documentation
</ul>
<p>
...and much more. This flexible editor makes it easy to customize just about everything in your environment and with more and more <a href="http://wbond.net/sublime_packages/community">plugins/packages</a> popping up all the time, there's a good chance the feature you need will be introduced soon.
</p>]]></description>
      <pubDate>Tue, 28 Feb 2012 08:49:07 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Nitschinger's Blog: RFC: li3_fixtures Rewrite]]></title>
      <guid>http://www.phpdeveloper.org/news/17588</guid>
      <link>http://www.phpdeveloper.org/news/17588</link>
      <description><![CDATA[<p>
<i>Michael Nitchinger</i> has a new post to his blog about <a href="http://nitschinger.at/RFC-li3_fixtures-Rewrite">a rewrite for the Lithium framework</a> - changing up the li3_fixtures plugin to make it a bit more of what the community needs.
</p>
<blockquote>
The <a href="https://github.com/daschl/li3_fixtures">li3_fixtures</a> plugin was my first Lithium plugin ever, and while it works okay, I feel there is a lot I can do to make it better and more flexible. In this post I want to share my ideas for a new fixture plugin and also want to gather feedback from the community to make it even more awesome.
</blockquote>
<p>
He gives three instance where fixtures can come in extremely useful - making effective model unit tests with predictable data, mocking models with shortcuts to the data and mocking out web services. Want to add in your own suggestions for his refactor? <a href="http://nitschinger.at/RFC-li3_fixtures-Rewrite">Comment on the post!</a>
</p>]]></description>
      <pubDate>Mon, 27 Feb 2012 09:23:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: WordPress Plugin Development]]></title>
      <guid>http://www.phpdeveloper.org/news/17561</guid>
      <link>http://www.phpdeveloper.org/news/17561</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how you can <a href="http://phpmaster.com/wordpress-plugin-development/">create a custom WordPress plugin</a> for the popular PHP-based blogging/CMS tool.
</p>
<blockquote>
If you've ever used WordPress to build a site quickly, chances are you've used one of the many plugins that are offered to extend the functionality of this popular blogging software. Plugins are one of the many things that make WordPress so attractive. [...] There are times, however, when you can't quite find what you need from existing plugins. This article will show you how to create your own WordPress plugins by walking you through an example to display some text using a widget in a the sidebar.
</blockquote>
<p>
He walks you through all of the steps you'll need to create the plugin - making the main plugin file (definition) and using some of the methods available to create the functionality: update, form, widget and the constructor to set it all up.
</p>]]></description>
      <pubDate>Mon, 20 Feb 2012 10:50:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Codeception Blog: BDD Approach to Unit Testing with Codeception]]></title>
      <guid>http://www.phpdeveloper.org/news/17545</guid>
      <link>http://www.phpdeveloper.org/news/17545</link>
      <description><![CDATA[<p>
<i>Michael Bodnarchuk</i> passed along a new post on the Codeception site about using the tool <a href="http://codeception.com/02-15-2012/unit-testing.html">in a behavior-driven testing methodology</a>. This post is a follow up to <a href="http://codeception.com/01-20-2012/starting-acceptance.html">their previous one</a> covering acceptance testing.
</p>
<blockquote>
With BDD approach in Codeception, any test, even the unit test, is written as a scenario. By this scenario you declare what you are doing and what results you expect to see. In traditional xUnit scheme your test is just a piece of code that uses the method being tested. This piece of code becomes a mess when you test complex units depending on other classes or when you need to check data in a database, etc. Codeception always keeps your unit tests simple and readable.
</blockquote>
<p>
Sample code is included for a simple "User" model class that needs testing. Since the class only directly contains a "create" method, that's all they test - setting up a new user, calling "create" and checking to see if they exist. This basic test is modified slightly to handle the exceptions that might be thrown from the "create" method (when something happens like the user already exists) and checking the user's default role assertions. Plus, using <a href="http://codeception.com/02-14-2012/generators-release-1-0-3.html">this plugin</a> for DocBlox</a>, you can generate readable test documentation directly from the code.
</p>]]></description>
      <pubDate>Wed, 15 Feb 2012 10:22:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ben Selby's Blog: DocBlox Plugin For Sublime Text 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17505</guid>
      <link>http://www.phpdeveloper.org/news/17505</link>
      <description><![CDATA[<p>
<i>Ben Selby</i> has <a href="http://www.soulbroken.co.uk/blog/2012/02/docblox-plugin-for-sublime-text-2/">released a Sublime Text 2 plugin</a> for the popular PHP-based documentation generation project <a href="http://www.docblox-project.org/">DocBlox</a>.
</p>
<blockquote>
It seems that the editor of the moment is Sublime Text 2 and sadly I have to tip my hat to Gary Rockett for showing it off to me one day.. Since that day, I've been a 100% convert. [...] So, I decided to peak into the <a href="https://github.com/stuartherbert/sublime-phpunit">PHPUnit [plugin from Stuart Herbert]</a> to see if I could create a <a href="http://www.docblox-project.org/">DocBlox</a> Plugin. It turns out you have to write Plugins in Python, which is interesting, since I know very little python. There seemed to be enough code there to get me going, so I now have a working <a href="https://github.com/benmatselby/sublime-docblox">DocBlox Plugin</a>.
</blockquote>
<p>
The result is a plugin that, once installed gives you a new context menu option to "Generate documentation" for the selected file. The console shows the progress of the build. You can get the plugin from <a href="http://wbond.net/sublime_packages/package_control">Package Control</a> or by <a href="https://github.com/benmatselby/sublime-docblox">grabbing it from github directly</a>.
</p>]]></description>
      <pubDate>Mon, 06 Feb 2012 15:39:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: PHPUnit Plugin For Sublime Text 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17500</guid>
      <link>http://www.phpdeveloper.org/news/17500</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i> has officially released a plugin for the popular text editor Sublime Text 2 to <a href="http://blog.stuartherbert.com/php/2012/02/04/phpunit-plugin-for-sublime-text-2/">integrate PHPUnit support</a> directly into the editing environment.
</p>
<blockquote>
<a href="http://www.sublimetext.com/2">Sublime Text 2</a> is a new cross-platform text editor that I've recently switched to. It's still in public beta, but already offers better performance (and battery life!) and a better look (fonts that render properly!) than Java-based IDEs such as Netbeans. One thing it didn't have was support for <a href="http://www.phpunit.de/">PHPUnit</a>, so I've made a <a href="https://github.com/stuartherbert/sublime-phpunit">plugin</a>. It's available to install via Package Control.
</blockquote>
<p>
The plugin allows you to directly create tests for a class using a context menu's "Test This Class" option. You can also run the tests directly from the editor and use either the menu or direct text commands to control it. He's also gathering some other well-used PHP snippets into another related plugin, the <a href="https://github.com/stuartherbert/sublime-phpsnippets">Additional PHP Snippets</a> plugin.
</p>]]></description>
      <pubDate>Mon, 06 Feb 2012 10:05:11 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sankuru Blog: A pluggable compiler and virtual machine in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17371</guid>
      <link>http://www.phpdeveloper.org/news/17371</link>
      <description><![CDATA[<p>
On the Sankuru blog today the next post in the series about creating a compiler in PHP has been posted. In <a href="http://sankuru.biz/blog/14-a-pluggable-compiler-and-virtual-machine-in-php-dogfood-yourself-with-your-own-plugins">this latest tutorial</a> he shows how to set up a plugin architecture for the compiler that allows you to quickly and easily extend it beyond its base functionality.
</p>
<blockquote>
A plugin architecture allows multiple developers to work on the same application and let yet another person assemble their work later on. It allows the plugin developer to understand just his plugin API without having to understand all the details of the entire application.
</blockquote>
<p>
He describes a few platforms that already have the concept of plugins including <a href="http://joomla.org/">Joomla</a>, <a href="http://www.mediawiki.org/">Mediawiki</a> and <a href="http://www.sugarcrm.com/crm/">SugarCRM</a>. He explains what a plugin architecture should be and what it shouldn't be. All of this is his first steps towards building a plugin-enabled compiler and virtual machine in PHP.
</p>]]></description>
      <pubDate>Tue, 10 Jan 2012 11:53:15 -0600</pubDate>
    </item>
  </channel>
</rss>

