<?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, 23 May 2012 05:38:52 -0500</pubDate>
    <ttl>30</ttl>
    <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[NetTuts.com: Easy Form Generation Using FuelPHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17672</guid>
      <link>http://www.phpdeveloper.org/news/17672</link>
      <description><![CDATA[<p>
On the NetTuts.com site today there's a new tutorial from <i>Sahan Lakshitha</i> about <a href="http://net.tutsplus.com/tutorials/php/easy-form-generation-using-fuelphp/">creating forms in FuelPHP</a>, the PHP 5.3-centric framework.
</p>
<blockquote>
Thanks to <a href="http://fuelphp.com/">FuelPHP</a>'s <a href="http://docs.fuelphp.com/classes/fieldset.html">fieldset</a> class, working with forms couldn't be easier. With a few lines of code, you can easily generate and validate a form. Today, we're going to learn how to do just that!
</blockquote>
<p>
He starts with guiding you through a simple install of the FuelPHP framework and configuring it to connect to a MySQL database. He shows how to set up a model, specify its properties and creating a controller to handle the user interaction. Using the definitions in the model, FuelPHP can automatically generate a form, complete with default options and some validation on the field (things like "required", "valid_url" and "max_length"). There's also code included showing how to edit current posts and listing out the complete post list.
</p>]]></description>
      <pubDate>Wed, 14 Mar 2012 10:05:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[CodeIgniter.com: New User Guide in Development]]></title>
      <guid>http://www.phpdeveloper.org/news/16957</guid>
      <link>http://www.phpdeveloper.org/news/16957</link>
      <description><![CDATA[<p>
The CodeIgniter development team is happy to announce <a href="http://codeigniter.com/news/new_user_guide_in_development#When:19:23:01Z">work that's been done on the framework's user guide</a> to help make it even better and easier to find the information you're looking for (now based on the <a href="http://sphinx.pocoo.org/">Sphinx documentation generation engine</a>).
</p>
<blockquote>
In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation.  Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples.  Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time.  As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files.
</blockquote>
<p>
There's also been a style redesign in the latest release (<a href="https://github.com/EllisLab/CodeIgniter/commit/8ede1a2ecbb62577afd32996956c5feaf7ddf9b6">here on github</a>) on the development branch of the framework. They warn of a few "bumps" that you might come across in using it, but they're working hard to take care of those quickly. If you'd like to see the new version, check out <a href="http://codeigniter.com/nightly_user_guide/">the nightly build results</a>.
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 09:55:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: Zend Framework Google Analytics Code Generation]]></title>
      <guid>http://www.phpdeveloper.org/news/16764</guid>
      <link>http://www.phpdeveloper.org/news/16764</link>
      <description><![CDATA[<p>
<i>Martin Aarhof</i> has put together <a href="https://github.com/lsv/zf-maa_analytics">an handy tool</a> for Zend Framework applications that creates the async javascript analytic code recommended by Google to provide tracking information back to Analytics.
</p>
<blockquote>
It supports: browser Settings Detection, campaign Duration, campaign Fields (custom), cross-domain linking and last but not least Ecommerce tracking.
</blockquote>
<p>
The configuration lets you set the various keys for your Analytics accounts, the domain name for it to live under, browser detection settings and various other settings for <a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiCampaignTracking.html">campaign configuration</a> and <a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html">domain setup</a>. You can find the full code on <a href="https://github.com/lsv/zf-maa_analytics">his github account</a> ready to download or clone.
</p>]]></description>
      <pubDate>Wed, 24 Aug 2011 09:46:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Random Number Generation In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16617</guid>
      <link>http://www.phpdeveloper.org/news/16617</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post to his blog today looking at true random number generation as it relates to predictability and bias. He <a href="http://blog.ircmaxell.com/2011/07/random-number-generation-in-php.html">also talks about</a> a method/tool you can use (based on RFC 4086) to generate truly random numbers - <a href="https://github.com/ircmaxell/PHP-CryptLib/">PHP-CryptLib</a>.
</p>
<blockquote>
When we talk about "random" numbers, we generally talk about two fundamental properties: Predictability and Bias. Both are closely related, but are subtly different. Predictability in reference to random numbers is the statistical problem of predicting the next value when knowing any number of previous values. Bias on the other hand is the statistical problem of predicting the next value when knowing the distribution of previous values.
</blockquote>
<p>
He looks at how predictability can effect true random number generation and a common mistake in generation related to bias in the calculation method. He talks about <a href="http://us.php.net/manual/en/function.rand.php">some</a> of <a href="http://us.php.net/manual/en/function.mt-rand.php">the</a> <a href="http://us.php.net/manual/en/function.lcg-value.php">functions</a> <a href="http://us.php.net/manual/en/function.uniqid.php">PHP includes</a> to work with randomness, but notes that they all have their flaws. He points to <a href="https://github.com/ircmaxell/PHP-CryptLib/">the PHP-CryptLib</a> package as a solution (adhering to the <a href="http://tools.ietf.org/html/rfc4086">guidelines in RFC 4086</a> for randomness). He includes some sample code of how to use it to generate random numbers, tokens and sets of bytes. You can find the full source <a href="https://github.com/ircmaxell/PHP-CryptLib">over on github</a>.
</p>]]></description>
      <pubDate>Thu, 21 Jul 2011 10:03:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: 6th Generation of ElePHPants is Born!]]></title>
      <guid>http://www.phpdeveloper.org/news/16225</guid>
      <link>http://www.phpdeveloper.org/news/16225</link>
      <description><![CDATA[<p>
The team that has brought you the infamous PHP ElePHPants in the past is <a href="http://www.elephpant.com/first-2-premature">back with another round</a> - the 6th generation of the cuddly PHP mascot in both traditional blue and pink.
</p>
<blockquote>
April 19, 2011 PHP&egrave;re is happy to show you the first pictures of two premature elePHPant the 6th generation of PHP. As you can see ... ElePHPant <a href="http://www.elephpant.com/files/images/6eme-proto-bleu.jpg">the blue</a>, is in great shape and has found its new home very pleasant 
</blockquote>
<p>
These are shots of the first turnouts of this latest batch and the rest will follow in June/July of this year. Those that have already ordered them will be contacted soon and, if you're interested in picking up some of your own, <a href="mailto:webmaster [at] elephpant [point] com">send them an email</a> for complete instructions.
</p>]]></description>
      <pubDate>Wed, 20 Apr 2011 12:11:13 -0500</pubDate>
    </item>
    <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>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Easy thumbnail generation using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16100</guid>
      <link>http://www.phpdeveloper.org/news/16100</link>
      <description><![CDATA[<p>
<i>Sameer Borate</i> has a recent post to his blog looking at a <a href="http://www.codediesel.com/php/easy-thumbnail-generation-using-php/>simple way to create thumbnails</a> with the help of the <a href="https://github.com/masterexploder/PHPThumb">PHP_Thumb</a> tool.
</p>
<blockquote>
One of the frequent requirements in web design is that of thumbnail generation. Although there are many libraries out there I found PHP Thumb simple and quick enough to implement in a recent project. PHP Thumb is a light-weight image manipulation library aimed at thumbnail generation. It offers the ability to resize, create custom crops, or square crops from the center, and rotate the image. If the need arises you can also easily add custom functionality to the library through plugins.
</blockquote>
<p>
Code examples are, of course, <a href="http://www.codediesel.com/php/easy-thumbnail-generation-using-php/">included in the post</a> showing simple thumbnail creation, image rotation, cropping, resizing and outputting to a different format. There's a brief mention of custom plugins and the ability to chain functions.
</p>]]></description>
      <pubDate>Fri, 25 Mar 2011 08:19:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Qafoo.com: Practical PHPUnit: Testing XML generation]]></title>
      <guid>http://www.phpdeveloper.org/news/15150</guid>
      <link>http://www.phpdeveloper.org/news/15150</link>
      <description><![CDATA[<p>
On the Qafoo blog today there's a new post from <i>Tobias Schlitt</i> about a method you can use to <a href="http://qafoo.com/blog/007_practical_phpunit_testing_xml_generation.html">unit test methods that generate XML</a> without messing with a lot of extra overhead just to test the results.
</p>
<blockquote>
Testing classes which generate XML can be a cumbersome work. At least, if you don't know the right tricks to make your life easier. In this article, I will throw some light upon different approaches and show you, how XML generation can be tested quite easily using XPath.
</blockquote>
<p>
He includes a sample class, qaPersonVisitor, that has methods inside it to create a simple XML documents based on the first and last name data into a DOM element. He sets up the basic test case that creates a simple person - including gender and date of birth - and offer a few different suggestions on handling the check (in <a href="http://phpunit.de">PHPUnit</a> tests):
</p>
<ul>
<li>the naive way of rebuilding the DOM object and assert that they are equal
<li>testing the resulting XML from the DOM object against a pre-generated XML document
<li>matching the contents via CSS selectors
<li>using the tag matching assertions
<li>using XPath in a custom assertion (with short and long uses of it included)
</ul>]]></description>
      <pubDate>Fri, 17 Sep 2010 13:51:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: Practical uses for reflection]]></title>
      <guid>http://www.phpdeveloper.org/news/11961</guid>
      <link>http://www.phpdeveloper.org/news/11961</link>
      <description><![CDATA[<p>
<a href="http://php.net/reflection">Reflection</a> can be a handy tool when you need it, but how many times have you actually found a use for it in the past few applications you've written? <i>Jani Hartikainen</i> has <a href="http://codeutopia.net/blog/2009/02/16/practical-uses-for-reflection/">one suggestion</a> of a place it can be used - form generation.
</p>
<blockquote>
Most web applications use forms. Forms often represent some model, such as a news post. If the model is simple, writing the form in HTML is not too bad, or we might be able to use a scaffolding feature in our framework. [...] Here's a good use for reflection! Since in models we often have a naming scheme for the data the users would be able to input, we can utilize this knowledge with reflection to generate a list of possible fields in the model, and then generate the form with less typing required from us.
</blockquote>
<p>
His example looks into the model class and pulls out the "get" functions and, after pulling out the name, adds it to a fields array. This array is then passed out to the display part of the script and looped over to create a text field for each. He expands it a bit to also include checking for "@return" values in docblock comments for the type of form field that should be displayed.
</p>]]></description>
      <pubDate>Tue, 17 Feb 2009 10:22:36 -0600</pubDate>
    </item>
  </channel>
</rss>

