<?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>Fri, 24 May 2013 20:47:36 -0500</pubDate>
    <ttl>30</ttl>
    <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>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Form Mastery with Zend_Config - Part 3, Standard Form & Element Options]]></title>
      <guid>http://www.phpdeveloper.org/news/17987</guid>
      <link>http://www.phpdeveloper.org/news/17987</link>
      <description><![CDATA[<p>
On the MaltBlue.com blog they've posted the latest part of their series on using Zend_Config configuration files to <a href="http://www.maltblue.com/zend-form/zend-form-mastery-with-zend-config-part-3-standard-form-element-options">create Zend_Form elements</a>. In this latest article, they show how to set some of the other properties on the elements (like "readonly" or "required").
</p>
<blockquote>
We've looked at custom form filters and we've looked at the core form configuration. But what about the other form properties? What about: setting an element as readonly, an element as required, ignoring an element and love them or hate them, what about decorators.
</blockquote>
<p>
He shows how to update the XML file to add these new attributes into the structure and <a href="http://www.maltblue.com/wp-content/uploads/2012/05/Screen-Shot-2012-05-21-at-14.23.38.png">the resulting form</a>. Also included are a few examples of using <a href="http://framework.zend.com/manual/en/zend.form.elements.html#zend.form.elements.decorators">decorators</a> to configure the look, feel and modify the attributes.
</p>]]></description>
      <pubDate>Tue, 22 May 2012 09:16:31 -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[MaltBlue.com: Zend Form Mastery with Zend Config - Part 1, Custom Filter Paths]]></title>
      <guid>http://www.phpdeveloper.org/news/17880</guid>
      <link>http://www.phpdeveloper.org/news/17880</link>
      <description><![CDATA[<p>
From MaltBlue.com there's <a href="http://www.maltblue.com/zend-framework/zend-form-mastery-with-zend-config-part-1-custom-filter-paths">a new post</a> (the first in a series) about mastering Zend_Form. In this first part of the series, they look at creating custom filter paths with the help of the Zend_Config component.
</p>
<blockquote>
When you're working with Zend Framework, and code in general, you keep your configuration as much out of code as you can - right? Well, if you want to write maintainable and flexible code you do. Well, if you've been working with Zend Framework and Zend Form for more than a little while, you know that it really makes that pretty simple via Zend_Config - well, some of the time.
</blockquote>
<p>
The article shows introduces you to some of the common configuration settings of Zend_Form and how those can be set in a configuration to make building the forms simpler. They talk about pre-element and form-wide filters in this first part of the series, including some code/configuration examples.
</p>]]></description>
      <pubDate>Mon, 30 Apr 2012 08:16:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Konr Ness' Blog: Zend_Config Benchmark - JSON, Array, INI, XML, YAML]]></title>
      <guid>http://www.phpdeveloper.org/news/17647</guid>
      <link>http://www.phpdeveloper.org/news/17647</link>
      <description><![CDATA[<p>
In <a href="http://konrness.com/php5/zend_config-benchmark-json-array-ini-xml-yaml/">this recent post</a> to his blog, <i>Konr Ness</i> has benchmarked the components that the Zend Framework uses to read in different types of configuration files - JSON, native PHP arrays, INI, XML and YAML files.
</p>
<blockquote>
If you application relies on parsing one or several config files each time it is bootstrapped it is important that you select a file format that is fast to parse. But you also want to select a config file format that is easy for a human to read and edit. In a recent application I am building I also had the need to write modifications to config files, so I also benchmarked the Zend_Config_Writer components.
</blockquote>
<p>
He includes both the sample configuration INI file and the benchmarking script he used to measure the results (all configurations were read from external files, even the native PHP option). His results were pretty predictable (with the exception of YAML reading) with the standard INI file coming in second to the native PHP arrays, but having the advantage of being more readable.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2012 11:51:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Matt Knight's Blog: Optimising Zend_Config]]></title>
      <guid>http://www.phpdeveloper.org/news/16557</guid>
      <link>http://www.phpdeveloper.org/news/16557</link>
      <description><![CDATA[<p>
<i>Matt Knight</i> has a recent post looking at a specific part of the Zend Framework, the Zend_Config component, and how it's overhead can be reduced (and somewhat replaced) <a href="http://www.matt-knight.co.uk/2011/optimising-zend-config/">using a few lines of PHP 5.3-specific code</a>.
</p>
<blockquote>
One such limitation that I've recently seen is the performance of Zend_Config. This class underpins the mechanism by which developers provide configuration to the application, and all this config is passed around in the form of Zend_Config objects. [...] For the purposes of this article, I'm referring specifically to config INI files, using Zend_Config_Ini to parse. This is a very common format for Zend applications to use - it is familiar to developers and infrastructure support teams - and is the case where the performance issues become apparent
</blockquote>
<p>
He talks about parsing ini files and the complications that can come with the Zend Framework method of parsing them - conversion to objects via a recursive method, merging data from different sections and the overhead toArray can cause. He shows an alternative that uses <a href="http://php.net/array_replace_recursive">array_replace_recursive</a> to handle the parsing and a class version that offers backwards compatibility with the Zend_Config structure. He claims to have seen a sixty percent jump in performance using these methods over the Zend Framework's defaults.
</p>]]></description>
      <pubDate>Wed, 06 Jul 2011 10:39:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Local config files and Zend_Application]]></title>
      <guid>http://www.phpdeveloper.org/news/15505</guid>
      <link>http://www.phpdeveloper.org/news/15505</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has <a href="http://akrabat.com/zend-framework/local-config-files-and-zend_application/">a new post today</a> showing you how to load in your own local configuration files into a Zend_Application Zend Framework app.
</p>
<blockquote>
A friend of mine recently had a requirement where she wanted to have two config files loaded into Zend_Application, so that the specific settings for the server were not stored in the version control system. Hence she has two config files: application.ini and local.ini where local.ini is different on each server. The easiest way to approach this problem is to load the two files within index.php, merge them and then pass the merged config file to Zend_Application.
</blockquote>
<p>
He includes the code to handle the import - pulling in both configuration files with Zend_Config and merging them with a "merge" call and setting their access back with a "setReadOnly".
</p>]]></description>
      <pubDate>Mon, 29 Nov 2010 10:50:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Manipulating Configuration Data with Zend_Config]]></title>
      <guid>http://www.phpdeveloper.org/news/15203</guid>
      <link>http://www.phpdeveloper.org/news/15203</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's <a href="http://devzone.zend.com/article/12491-Manipulating-Configuration-Data-with-Zend_Config">a new tutorial</a> from <i>Vikram Vaswasi</i> about working with the configuration data from your files (in multiple formats like XML and the more traditional INI) with the help of the Zend_Config component of the Zend Framework.
</p>
<blockquote>
Thus far, I'd been using a hand-rolled library for this task; however, this library was now fairly dated and didn't take advantage of many of the newer PHP 5.x features and so, I'd been looking for a more modern replacement. Zend_Config seemed to meet my needs, so I played with it a little and then deployed it in a couple of projects. It did everything I needed it to, and was easy to integrate with both framework and non-framework PHP projects. It also has a couple of neat features, such as the ability to merge multiple configurations together.
</blockquote>
<p>
His "crash course" starts with an example of pulling in the contents of an XML-based configuration file with dialer information (like for a modem). He talks about setting up rules, formatting the results, working with more complex nested data and much, much more. The Zend_Config component allows you to be hugely flexible with how you handle - and translate - the data that comes out of your config files.
</p>]]></description>
      <pubDate>Wed, 29 Sep 2010 09:51:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Muhammad Hussein Fattahizadeh's Blog: Zend Config tree solution]]></title>
      <guid>http://www.phpdeveloper.org/news/14681</guid>
      <link>http://www.phpdeveloper.org/news/14681</link>
      <description><![CDATA[<p>
In a <a href="http://www.mhf.ir/web/zend-config-tree-solution/">new post to his blog</a> <i>Muhammad Hussein Fattahizadeh</i> talks about defining a system that's a bit more handy than the usual one configuration file to one Zend_Config object relationship most projects use. His alternative uses a class to load multiple config files all at once.
</p>
<blockquote>
The best part of my favorite PHP framework, Zend framework is Zend_Config. With Zend Config you can run you web application with more power full configuration that any one can change your application setting for use. [...] But in most web application you may have many configuration file with special format such as INI, XML or PHP. Also some of configuration is for one part of your application and may you put in special folders.
</blockquote>
<p>
He includes the code for his class that allows you to start with a base folder and search through it to find ini, xml and php files with configuration information inside. There's also a snippet of code showing how to use it and pull configuration objects from the data it fetches.
</p>]]></description>
      <pubDate>Tue, 22 Jun 2010 08:42:58 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ben Scholzen's Blog: Writing powerful and easy config files with PHP-arrays]]></title>
      <guid>http://www.phpdeveloper.org/news/12491</guid>
      <link>http://www.phpdeveloper.org/news/12491</link>
      <description><![CDATA[<p>
<i>Ben Scholzen</i> has <a href="http://www.dasprids.de/blog/2009/05/08/writing-powerful-and-easy-config-files-with-php-arrays">written up a post</a> about how regular PHP arrays can be used as a native configuration option for your applications.
</p>
<blockquote>
I was asked many times how I organize my config files, and my response was always the same, until some time ago when I switched began refactoring the codebase of my blog. [...] Looking at [the advantages of PHP config files], you may ask now why not everbody is using them. Well the problem mostly is that you cannot create extend-sections (when working with Zend_Config for example). 
</blockquote>
<p>
He compares an example of a method that, using a base config file with some "smarts", you can have it automatically pull in certain files and overwrite settings from the array inside. A sample "other config" file is also included, showing the definition of some PHP settings, resources and database information.
</p>]]></description>
      <pubDate>Mon, 11 May 2009 12:05:45 -0500</pubDate>
    </item>
  </channel>
</rss>
