<?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 21:29:00 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Joshua Thijssen: Custom symfony2 config loader]]></title>
      <guid>http://www.phpdeveloper.org/news/19111</guid>
      <link>http://www.phpdeveloper.org/news/19111</link>
      <description><![CDATA[<p>
In <a href="http://www.adayinthelifeof.nl/2013/01/30/custom-symfony2-config-loader/">his latest post</a> <i>Joshua Thjissen</i> looks at the creation of a custom configuration loader for a Symfony2 application. This kind of thing is mostly useful for parsing configurations that Symfony2 doesn't already know how to parse.
</p>
<blockquote>
It happens more and more: large projects where your symfony2 site is just a small part in the big picture. Lots of additional components might even play a bigger part, especially when you are dealing with asynchronous components  which are connected through message queues for instance. [...] Our first idea is obvious: symfony2 uses by default a parameters.yml file, which gets imported by your configuration (config.yml) [...] So nothing new here and this setup works perfectly, provided that your symfony2 project is the ONLY thing that needs to be configured. As soon as you add multiple other components (like gearman or activemq workers that need to connect to solr too), they need to share this configuration. 
</blockquote>
<p>
His solution involves falling back to the INI-file format that's known as useful for several different languages and tools. Because of how Symfony2 reads these files though (only looking for "parameters") he's had to create a "ConfFileLoader" instance of the "FileLoader" that uses the <a href="http://php.net/parse_ini_file"> parse_ini_file</a> method to parse the data and return it back to the main container as parameters. He also includes the code/config you'll need to implement this custom loader into your application.
</p>]]></description>
      <pubDate>Wed, 30 Jan 2013 11:51:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: So You Want to Accept Credit Cards Online?]]></title>
      <guid>http://www.phpdeveloper.org/news/18091</guid>
      <link>http://www.phpdeveloper.org/news/18091</link>
      <description><![CDATA[<p>
On NetTuts.com they're posted a new tutorial about <a href="http://net.tutsplus.com/tutorials/other/so-you-want-to-accept-credit-cards-online/">using the Stripe service</a> to accept credit cards on your site. Thanks to some handy libraries they provide, integration is a relatively simple process.
</p>
<blockquote>
Until recently, accepting credit cards on a website was expensive and complicated. But that was before <a href="https://stripe.com/">Stripe</a>: a radically different and insanely awesome credit card processing company. Today, I'll show you how to start accepting cards in 30 minutes or less - without spending a dime.
</blockquote>
<p>They step you through the whole process you'll need to get the full flow set up:</p>
<ul>
<li>Install an SSL Certificate (on your server)
<li>Create an Account
<li>Create Your Payment Form
<li>Collect The Form Values
<lI>Request a Token
<li>Create a Server-Side Script
</ul>
<p>
Screenshots of the Stripe interface, HTML, Javascript and PHP code are all included - everything you need to make the simple card handling work. One of the keys to how Stripe deals with credit cards is that you provide it the card info, it gives you a token. Your app uses this to work with the card instead of storing the card information in your database (also making it more secure).
</p>]]></description>
      <pubDate>Thu, 14 Jun 2012 09:30:25 -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[PHPBuilder.com: Back to Basics: Managing PHP Configuration php.ini Directives]]></title>
      <guid>http://www.phpdeveloper.org/news/16688</guid>
      <link>http://www.phpdeveloper.org/news/16688</link>
      <description><![CDATA[<p>
<i>Jason Gilmore</i> gets "back to basics" in a new tutorial with a look at <a href="http://www.phpbuilder.com/columns/php-directives/Jason_Gilmore08032011.php3">managing configuration in your ini file</a> to tune it to just what you need.
</p>
<blockquote>
While PHP's configuration capabilities are indeed powerful, the sheer breadth and different ways in which these configuration directives can be set are often confusing and downright intimidating to newcomers. So in this article it worth meandering from the typically intermediate-level discussion and instead offer some insight into PHP's configuration-specific infrastructure.
</blockquote>
<p>
He starts by mentioning the <a href="http://php.net/phpinfo">phpinfo</a> function that generates the complete list of current settings for your installation. With that in hand and an idea of what settings are out there, he starts going through some of the basics of working with ini settings - updating the php.ini, setting values via a .htaccess file and chancing them directly in the executing script.
</p>]]></description>
      <pubDate>Mon, 08 Aug 2011 13:16:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Zend_Config_Ini and a string]]></title>
      <guid>http://www.phpdeveloper.org/news/16499</guid>
      <link>http://www.phpdeveloper.org/news/16499</link>
      <description><![CDATA[<p>
In a new post today <i>Rob Allen</i> shows a method you can drop into your Zend Framework application to <a href="http://akrabat.com/zend-framework/zend_config_ini-and-a-string/">allow Zend_Config_Ini to take in a string</a> instead of being restricted to loading a file.
</p>
<blockquote>
With PHP 5.3 however there is is a new function called <a href="http://php.net/parse_ini_string">parse_ini_string()</a> which will allow us to load arbitrary ini string into Zend_Config objects. This can't go into Zend Framework 1 though due to our PHP 5.2.4 minimum version requirement. As I needed this for a project, I extended Zend_Config_Ini to support this feature, which means simply overloading a single method.
</blockquote>
<p>
He includes the code for the method - the App_Config_Ini class that includes a _parseIniFile method that checks to see if the last four characters of the input value are ".ini". If so, it loads like normal. If not, it assumes it's a configuration string and parses it with the new parse_ini_string method. 
</p>]]></description>
      <pubDate>Tue, 21 Jun 2011 12:30:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Using PHP classes to store configuration data]]></title>
      <guid>http://www.phpdeveloper.org/news/15711</guid>
      <link>http://www.phpdeveloper.org/news/15711</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has <a href="http://gonzalo123.wordpress.com/2011/01/10/using-php-classes-to-store-configuration-data/">a new post</a> to his blog today looking at how he uses PHP classes to store configuration information for easier retrieval.
</p>
<blockquote>
In my last projects I'm using something I think is useful and it's not a common practice in our PHP projects. That's is the usage of a plain PHP's class for the application's configuration. Let me explain it. Normally we use ini file for configuration. [...] There are many standard options. Why I prefer a different one then? I like plain PHP classes because the IDE helps me with autocompletion. The usage is quite simple. 
</blockquote>
<p>
His example uses a standard class to store the configuration values, one that can be loaded into a project and lets you call the configuration values statically. He gives <a href="http://gonzalo123.files.wordpress.com/2011/01/netbeans.png">two</a> <a href="http://gonzalo123.files.wordpress.com/2011/01/vim.png">examples</a> of how this is helpful in a standard IDE with autocompletion.
</p>]]></description>
      <pubDate>Mon, 10 Jan 2011 11:57:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Moon's Blog: Using ini files for PHP application settings]]></title>
      <guid>http://www.phpdeveloper.org/news/13875</guid>
      <link>http://www.phpdeveloper.org/news/13875</link>
      <description><![CDATA[<p>
In <a href="http://brian.moonspot.net/using-ini-files-for-php-application-settings">a new post</a> to his blog <i>Brian Moon</i> looks at a handy piece of functionality that comes with the default PHP installations (and is used by several major frameworks <a href="http://framework.zend.com">like this one</a>) - using INI files to store settings for an application.
</p>
<blockquote>
One of the challenges of this [three tier server setup] is where and how to store the connection information for all these services. We have done several things in the past. The most common thing is to store this information in a PHP file. [...] We have taken [it] one step further using some PHP ini trickeration. We use ini files that are loaded at PHP's startup and therefore the information is kept in PHP's memory at all times.
</blockquote>
<p>
They use the <a href="http://php.net/get_cfg_var">get_cfg_var</a> function and the "--with-config-file-scan-dir" option to tell PHP to automatically load in the ini files it finds in the named directory. He gives an example of both a simple configuration and a more complex situation where a MySQL instance can read from the ini file containing the username/password/host information.
</p>]]></description>
      <pubDate>Wed, 20 Jan 2010 10:40:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Tools of the Trade: Web Development Frameworks that the Pros Use]]></title>
      <guid>http://www.phpdeveloper.org/news/13697</guid>
      <link>http://www.phpdeveloper.org/news/13697</link>
      <description><![CDATA[<p>
New from NETTUTS.com today there's <a href="http://net.tutsplus.com/articles/web-roundups/tools-of-the-trade-web-development-frameworks-that-the-pros-use/">a new article</a> listing out some of the tools of the trade, the frameworks that web development professionals use (and not just with PHP).
</p>
<blockquote>
New web development frameworks, promising rapid development and easy deployment, are sprouting out at a more rapid pace than you can keep up. In the last article, we looked at the various factors you'd have to consider when deciding on a framework. Today, we are going to look at the various frameworks available for each facet of web development.
</blockquote>
<p>
PHP tools that made the list include <a href="http://cakephp.org/">CakePHP</a>, the <a href="http://framework.zend.com">Zend Framework</a>, <a href="http://www.kohanaphp.com/">Kohana</a> and <a href="http://www.symfony-project.org/">Symfony</a>. Frameworks from some of the other languages include <a href="http://www.asp.net/">ASP.NET</a>, <a href="http://rubyonrails.org/">Ruby on Rails</a>, <a href="http://jquery.com/">jQuery</a> and <a href="http://www.blueprintcss.org/">Blueprint</a>.
</p>]]></description>
      <pubDate>Fri, 18 Dec 2009 08:15:56 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Custom Apps: Some Strategies For Easy Configuration Files]]></title>
      <guid>http://www.phpdeveloper.org/news/13229</guid>
      <link>http://www.phpdeveloper.org/news/13229</link>
      <description><![CDATA[<p>
In <a href="http://www.brandonsavage.net/custom-apps-some-strategies-for-easy-configuration-files/">this new post</a> to his blog today <i>Brandon Savage</i> looks at configuration options for PHP apps and gives some examples to help you get the thought process started for your development.
</p>
<blockquote>
One of the decisions that has to be made each time an application is written for distribution is how best to set up the configuration files. There are a number of different approaches taken to this: some opt to use the define() function and define constants, while others use large arrays. 
</blockquote>
<p>
He points out a few "overlooked options" that some developers might no consider when working with configuration files like class constants and ini files (which PHP can <a href="http://us.php.net/manual/en/function.parse-ini-file.php">parse natively</a>). A few code snippets are included to show examples of them in use.
</p>]]></description>
      <pubDate>Wed, 16 Sep 2009 07:59:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Joe Topjian's Blog: My Zend_Acl Implementation]]></title>
      <guid>http://www.phpdeveloper.org/news/12023</guid>
      <link>http://www.phpdeveloper.org/news/12023</link>
      <description><![CDATA[<p>
In <a href="http://joe.topjian.net/development/my-zend_acl-implementation.html">this recent post</a> to his blog <i>Joe Topjian</i> takes a look at something that has been known to confuse Zend Framework users when trying to set up access control for their application - using the <a href="http://framework.zend.com/manual/en/zend.acl.html">Zend_Acl</a> component.
</p>
<blockquote>
It seems everyone, myself included, has a bit of a hard time first grasping <a href="http://framework.zend.com/manual/en/zend.acl.html">Zend_Acl</a>. For the time being, I've settled on a simple solution. It's party based on the solution given in the <a href="http://www.manning.com/allen/">Zend Framework in Action book</a>. I hope you get some use out of it.
</blockquote>
<p>
<a href="http://joe.topjian.net/development/my-zend_acl-implementation.html">His example</a> uses the Zend_Config component to configure his roles and a more centralized approach to validating access for the users - more rules in the INI config file and a custom MyACL class/AclHelper tat are called from the bootstrap file to evaluate where the user can and cant go for each request.
</p>]]></description>
      <pubDate>Wed, 25 Feb 2009 13:45:43 -0600</pubDate>
    </item>
  </channel>
</rss>
