<?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>Sat, 25 May 2013 16:35:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell: First Phing Plugin]]></title>
      <guid>http://www.phpdeveloper.org/news/19358</guid>
      <link>http://www.phpdeveloper.org/news/19358</link>
      <description><![CDATA[<p>
In the latest post to her site, <i>Lorna Mitchell</i> walks you through the creation of <a href="http://www.lornajane.net/posts/2013/first-phing-plugin">a first Phing plugin</a>, an extension to the popular PHP-based build tool.
</p>
<blockquote>
I'm a huge fan of <a href="http://phing.info/">Phing</a> and use it regularly for build and deployment tasks. Often, I'll ask about a plugin that I wish existed, and get a very courteous "patches welcome" from the nice people in the #phing channel on freenode. This has happened a few times, so I thought I should probably look at how to make a new phing plugin, this article shows you how to make the simplest thing I could think of: a simple "hello world" plugin.
</blockquote>
<p>
She points you to the location to grab the latest version of the tool (the github repository) and how to define a configuration file for your test runs. Then she includes the sample code showing how to create the "HelloTask" plugin. It takes an input value of "name" and displays a greeting when executed. She shows the syntax for defining this in the XML build file and the sample result when executed.
</p>]]></description>
      <pubDate>Mon, 25 Mar 2013 10:49:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Parsing XML With SimpleXML]]></title>
      <guid>http://www.phpdeveloper.org/news/19171</guid>
      <link>http://www.phpdeveloper.org/news/19171</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial <a href="http://phpmaster.com/parsing-xml-with-simplexml/">introducing you to SimpleXML</a>, a handy bit of functionality included with the base PHP install to make working with XML (well, reading it) much simpler.
</p>
<blockquote>
Parsing XML essentially means navigating through an XML document and returning the relevant data. An increasing number of web services return data in JSON format, but a large number still return XML, so you need to master parsing XML if you really want to consume the full breadth of APIs available. Using PHP's SimpleXML extension that was introduced back in PHP 5.0, working with XML is very easy to do. In this article I'll show you how.
</blockquote>
<p>
He starts with some basic usage of the SimpleXML parsing, giving an example XML to parse, the resulting object and how to access the data inside it. There's also a bit about dealing with namespaces in the XML you're parsing and a more practical example - parsing the output of a YouTube feed to get links to various videos.
</p>]]></description>
      <pubDate>Tue, 12 Feb 2013 12:48:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Podner: Managing PHP Application Builds with Phing]]></title>
      <guid>http://www.phpdeveloper.org/news/19128</guid>
      <link>http://www.phpdeveloper.org/news/19128</link>
      <description><![CDATA[<p>
<i>Andrew Podner</i> has a new post to his site today <a href="http://unassumingphp.com/managing-php-application-builds-with-phing/">introducing you to Phing</a>, a PHP-based build tool (designed after on Apache Ant) that makes automating builds of your applications easy.
</p>
<blockquote>
One of the things I have been focusing on lately is trying to to a better job of mechanizing and automating the process of building and deploying an application.  The reason for this is pretty simple:  applications just seem to keep getting more and more complicated and intricate as time goes on. [...] <a href="http://www.phing.info/">Phing</a> is a "project build system" that helps developers manage repetitive tasks associated with preparation and deployment of applications.  Phing uses XML based files to allow you the ability to customize the build process to the individual application. 
</blockquote>
<p>
He walks you through the Phing installation (from PEAR, note that you can install it <a href="https://packagist.org/packages/phing/phing">via Composer</a> now too) and how to set up your first project XML definition. He shows you how to add a "target" or step to the build with the basic example of running your app's PHPUnit tests. He also includes a list of other things Phing can do and work with including CodeSniffer checks, FTP handling, version control interfaces and automated documentation.
</p>]]></description>
      <pubDate>Mon, 04 Feb 2013 09:08:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sherif Ramadan: How to Write an Operator Precedence Parser in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19068</guid>
      <link>http://www.phpdeveloper.org/news/19068</link>
      <description><![CDATA[<p>
<i>Sherif Ramadan</i> has a post looking at <a href="https://sheriframadan.com/2013/01/how-to-write-an-operator-precedence-parser-in-php/">creating a better operator precedence parser</a> in PHP. <a href="https://github.com/srgoogleguy/Mphp/">His example</a> is a fully PHP implementation that takes equation strings and evaluates them to create the result.
</p>
<blockquote>
Operator precedence parsers are very simple on the surface. So don't feel in the least bit intimidated, because by the time you've read through this I hope to have you walk away with a solid foundation on how to write your very own operator precedence parser. The goal is to understand how to solve the problem of operator precedence parsing, and not necessarily to write your own parser. Learning how the problem can be solved is the most important thing to take away from this article.
</blockquote>
<p>
He starts with an introduction to the concepts behind "operator precedence" including processing order and grouping. He also mentions infix and postfix (RPN) notations for handling different formats of equations. He used the "Shunting-yard Algorithm" and how it relates to handling the different parts of the equation, one at a time, in the correct order. He rest of the post is dedicated to the details of the execution in the tool, including code examples and the tokenization of the strings passed into it.
</p>]]></description>
      <pubDate>Mon, 21 Jan 2013 11:21:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings Blog: DPCRadio: Let's Build a Parser]]></title>
      <guid>http://www.phpdeveloper.org/news/18652</guid>
      <link>http://www.phpdeveloper.org/news/18652</link>
      <description><![CDATA[<p>
On the Ibuildings blog today they've released the latest episode of their DPC Radio podcast series as recorded at this year's <a href="http://phpconference.nl">Dutch PHP Conference</a> (2012). In <a href="http://blog.ibuildings.com/2012/10/23/dpcradio-lets-build-a-parser/">this new episode</a>, they share <i>Boy Baukema</i>'s session "Let's Build a Parser".
</p>
<blockquote>
During this talk an introduction will be given to parsing. Terms like 'formal grammar', 'lexing / scanning', 'LL / LALR / PEG' will be explained and put into context. We will look at a recursive descent parsing as a practical way to parse languages. Finally the audience will be left with ways to get started with parsing structured text into memory.
</blockquote>
<p>
You can listen to this latest episode either through <a href="http://blog.ibuildings.com/2012/10/23/dpcradio-lets-build-a-parser/">the in-page player</a> or by <a href="http://dpcradio.s3.amazonaws.com/2012_002.mp3">downloading the mp3</a>. You can also see the slides from the presentation <a href="http://www.slideshare.net/relaxnow/lets-build-a-parser">on Slideshare</a>.
</p>]]></description>
      <pubDate>Wed, 24 Oct 2012 10:19:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Explore Aspect Oriented Programming with CodeIgniter, Part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/18402</guid>
      <link>http://www.phpdeveloper.org/news/18402</link>
      <description><![CDATA[<p>
PHPMaster.com is back with the <a href="http://phpmaster.com/explore-aspect-oriented-programming-with-codeigniter-3/">third part</a> of their series looking at Aspect Oriented Programming with the <a href="http://codeigniter.com">CodeIgniter</a> framework. (<a href="http://phpmaster.com/explore-aspect-oriented-programming-with-codeigniter-1/">Part 1</a>, <a href="http://phpmaster.com/explore-aspect-oriented-programming-with-codeigniter-2/">Part 2</a>)
</p>
<blockquote>
In the previous parts of the series we learned about AOP concepts and the need for using AOP in large scale projects and I introduced CodeIgniter's hooks as a convenient mechanism for creating AOP functionality from scratch. In this part I'll show you how to use both XML and comment-based techniques to create custom AOP functionality when a dedicated AOP framework is not available.
</blockquote>
<p>
They start with the XML configuration that defines a few aspects and pointcuts for the application. This is then read in via the "applyBeforeAspects" and the aspects that should be executed first are extracted, loaded and run. Following this, they take the other approach - based on docblock comments - and pull in the comments (the @before and @after tags) and load/execute the aspects that way instead.
</p>]]></description>
      <pubDate>Fri, 24 Aug 2012 11:56:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nikita Popov's Blog: A plea for less (XML) configuration files]]></title>
      <guid>http://www.phpdeveloper.org/news/18207</guid>
      <link>http://www.phpdeveloper.org/news/18207</link>
      <description><![CDATA[<p>
<i>Nikita Popov</i> has <a href="http://nikic.github.com/2012/07/09/A-plea-for-less-XML-configuration-files">posted a plea</a> to developers and project maintainers alike to stop using XML for their configuration files in their PHP-based applications.
</p>
<blockquote>
I recently tried using <a href="http://www.phing.info/trac/">Phing</a> (a PHP build system) to do some simple release automation. Just creating a PEAR package and doing a few string replacements here and there. The result? After several wasted hours I ended up using Phing only for PEAR packaging and doing everything else in a custom PHP build script. The reason? Phing uses XML files to configure what it should do during a build. 
</blockquote>
<p>
He advocates a more native solution - a PHP script that defines the configuration options as a part of an object that can be injected into the parts of your app without the need for external dependencies.
</p>]]></description>
      <pubDate>Tue, 10 Jul 2012 10:09:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: Zend Framework Security Upgrade (Zend_XmlRpc XXE Issue)]]></title>
      <guid>http://www.phpdeveloper.org/news/18135</guid>
      <link>http://www.phpdeveloper.org/news/18135</link>
      <description><![CDATA[<p>
Based in some recent issues found with the Zend_XmlRpc component of the Zend Framework, the project has <a href="http://framework.zend.com/security/advisory/ZF2012-01">release an update</a>, version 1.11.12 that includes a fix for the component to prevent an XXE injection attack.
</p>
<blockquote>
Zend_XmlRpc is vulnerable to XML eXternal Entity (XXE) Injection attacks. The SimpleXMLElement class (SimpleXML PHP extension) is used in an insecure way to parse XML data. External entities can be specified by adding a specific DOCTYPE element to XML-RPC requests. By exploiting this vulnerability an application may be coerced to open arbitrary files and/or TCP connections.
</blockquote>
<p>
<a href="http://framework.zend.com/security/advisory/ZF2012-01">This security advisory</a> describes the problem as well as the steps taken to correct it and provide the update. It is recommended that anyone using this component upgrade immediately to prevent issues. You can download the latest issue from <a href="http://framework.zend.com/download/latest">the Zend Framework download page</a>.
</p>]]></description>
      <pubDate>Mon, 25 Jun 2012 21:20:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: PHP DOM: Working with XML]]></title>
      <guid>http://www.phpdeveloper.org/news/18063</guid>
      <link>http://www.phpdeveloper.org/news/18063</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial posted about <a href="http://phpmaster.com/php-dom-working-with-xml/">using XML in PHP</a>, an introduction to using the DOM functionality in PHP to work with your XML content.
</p>
<blockquote>
PimpleXML allows you to quickly and easily work with XML documents, and in the majority of cases SimpleXML is sufficient. But if you're working with XML in any serious capacity, you'll eventually need a feature that isn't supported by SimpleXML, and that's where the PHP DOM (Document Object Model) comes in.
</blockquote>
<p>
He starts with a brief introduction to XML and DTDs including an example of each (defining a sample book information he'll use in the rest of the tutorial). He helps you create a simple class that takes in the XML content, working with construction/destruction of the object and using it to find, add and delete a book by things like ISBN or genre.
</p>]]></description>
      <pubDate>Fri, 08 Jun 2012 08:27:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Form Mastery with Zend Config - Part 4 Configuring Zend Validators]]></title>
      <guid>http://www.phpdeveloper.org/news/18050</guid>
      <link>http://www.phpdeveloper.org/news/18050</link>
      <description><![CDATA[<p>
On the MaltBlue blog <i>Matt</i> has posted the latest part of the "Zend_Form with Zend_Config" series, <a href="http://www.maltblue.com/zend-framework/zend-form-mastery-with-zend-config-part-4-configuring-zend-validators">part four</a> looking at using and configuring some form validators.
</p>
<blockquote>
Welcome to the fourth and final part in the Zend Form Mastery with Zend Config series. Previously we looked at the basic form options, element and form wide prefixes, filters and element options. In this installment, we're going to look at configuring Zend Validators via our XML config. [...] To go in to all of them will take more time than is allowed in the confines of this article. So we're going to work through 5 of the more interesting and likely used ones.
</blockquote>
<p>
He covers the validation for: email addresses, postal codes, seeing if a record exists in the database, IBAN validation and checking to see if a value is in an array. He gives XML examples for each of these validation methods including the definitions of options and error/feedback messages. 
</p>]]></description>
      <pubDate>Tue, 05 Jun 2012 11:25:45 -0500</pubDate>
    </item>
  </channel>
</rss>
