<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using a PHP Class to Store Configuration</title>
	<atom:link href="http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/</link>
	<description>Web development blog</description>
	<lastBuildDate>Wed, 11 Apr 2012 03:57:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: HiSoRange</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1968</link>
		<dc:creator>HiSoRange</dc:creator>
		<pubDate>Wed, 11 Apr 2012 03:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1968</guid>
		<description>it deleted the &quot;\re\turn \arr\ay( &#039;host&#039; =\&gt;&quot; without slashes ofc</description>
		<content:encoded><![CDATA[<p>it deleted the &#8220;\re\turn \arr\ay( &#8216;host&#8217; =\&gt;&#8221; without slashes ofc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HiSoRange</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1967</link>
		<dc:creator>HiSoRange</dc:creator>
		<pubDate>Wed, 11 Apr 2012 03:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1967</guid>
		<description>If you want to make simplier then use $_ENV[&#039;DB_HOST&#039;]. If you want it to make more practical like you don&#039;t wana or can&#039;t step in ftp to the site then put configurations into editable form, yaml and xml nice but need to be parsed what is unnecessay most of time, use nativ php source

 &#039;localhost&#039;, &#039;user&#039; =&gt; &#039;me&#039; );

and call it with 

function config( $ns )
{
    return ( object ) include( &#039;path/to/config/dir/&#039; . strtr( $ns, &#039;.&#039;, DIRECTORY_SEPARATOR ) . &#039;.php&#039; );

}

and you can have something like this

config( &#039;system.database&#039; )-&gt;host;
$dbconf = config( &#039;system.database&#039; );

But Config\DB_HOST cool it&#039;s age of namespaces anyway.</description>
		<content:encoded><![CDATA[<p>If you want to make simplier then use $_ENV['DB_HOST']. If you want it to make more practical like you don&#8217;t wana or can&#8217;t step in ftp to the site then put configurations into editable form, yaml and xml nice but need to be parsed what is unnecessay most of time, use nativ php source</p>
<p> &#8216;localhost&#8217;, &#8216;user&#8217; =&gt; &#8216;me&#8217; );</p>
<p>and call it with </p>
<p>function config( $ns )<br />
{<br />
    return ( object ) include( &#8216;path/to/config/dir/&#8217; . strtr( $ns, &#8216;.&#8217;, DIRECTORY_SEPARATOR ) . &#8216;.php&#8217; );</p>
<p>}</p>
<p>and you can have something like this</p>
<p>config( &#8216;system.database&#8217; )-&gt;host;<br />
$dbconf = config( &#8216;system.database&#8217; );</p>
<p>But Config\DB_HOST cool it&#8217;s age of namespaces anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1963</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 03 Apr 2012 17:31:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1963</guid>
		<description>Why? Parsing an external data structure or accessing a database would add lots of unnecessary overhead. You&#039;d have to examine your requirements to determine if that would be worth it.</description>
		<content:encoded><![CDATA[<p>Why? Parsing an external data structure or accessing a database would add lots of unnecessary overhead. You&#8217;d have to examine your requirements to determine if that would be worth it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lloyd</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1962</link>
		<dc:creator>Lloyd</dc:creator>
		<pubDate>Tue, 03 Apr 2012 13:09:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1962</guid>
		<description>It would be better to put configuration information in a yaml file or xml file or even in a database.</description>
		<content:encoded><![CDATA[<p>It would be better to put configuration information in a yaml file or xml file or even in a database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1274</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sun, 08 Aug 2010 02:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1274</guid>
		<description>Well the use of a class is meant to solve the namespace issues. You could choose to use an array in the class, but the idea is the same. XML can be used for persistent storage, but you&#039;d still need a place to store the data at runtime.</description>
		<content:encoded><![CDATA[<p>Well the use of a class is meant to solve the namespace issues. You could choose to use an array in the class, but the idea is the same. XML can be used for persistent storage, but you&#8217;d still need a place to store the data at runtime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: awake</title>
		<link>http://www.ultramegatech.com/2010/02/php-class-to-store-configuration/comment-page-1/#comment-1271</link>
		<dc:creator>awake</dc:creator>
		<pubDate>Fri, 06 Aug 2010 19:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ultramegatech.com/blog/?p=817#comment-1271</guid>
		<description>is this really useful?  is it not better to use XML or arrays, just tasking</description>
		<content:encoded><![CDATA[<p>is this really useful?  is it not better to use XML or arrays, just tasking</p>
]]></content:encoded>
	</item>
</channel>
</rss>

