<?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 08:53:13 -0500</pubDate>
    <ttl>30</ttl>
    <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[Eirik Hoem's Blog: Simple config management for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10304</guid>
      <link>http://www.phpdeveloper.org/news/10304</link>
      <description><![CDATA[<p>
In <a href="http://blog.eirikhoem.net/index.php/2008/05/30/simple-config-management-for-php/">a new post</a> to his blog today, <i>Eirik Hoem</i> gives an example of using the parse_ini_file function to work with .ini files as configuration for your application.
</p>
<blockquote>
When doing complex applications it's often nice to have some sort of system for handling settings. PHP has a nice function called parse_ini_file which can be used to create a basic but still usable setting file feature. A simple class which loads the configuration file and offers some methods to retrieve the values for a given key is all that's needed.
</blockquote>
<p>
His example code gives a sample ini file with database connection information and a MyConfigClass that parses the file and can get or set values in it.
</p>
]]></description>
      <pubDate>Fri, 30 May 2008 07:54:50 -0500</pubDate>
    </item>
  </channel>
</rss>
