<?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: Zend Config tree solution</title>
	<atom:link href="http://mhf.ir/web/zend-config-tree-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://mhf.ir/web/zend-config-tree-solution/</link>
	<description>Personal blog of Muhammad Hussein Fattahizadeh</description>
	<lastBuildDate>Mon, 28 Jun 2010 11:45:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jeroen Keppens</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-519</link>
		<dc:creator>Jeroen Keppens</dc:creator>
		<pubDate>Sun, 27 Jun 2010 08:49:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-519</guid>
		<description>Hi

I like the idea. Apart from the caching/resource comment, which I agree 100% with, I think you should also have another look at the name to the config. The &quot;XML&quot; inside it is not clean and I wonder if it might be even nicer to have a level per dir:

Suppose you have these files:

configs/database/mysql/news.xml
configs/database/mysql/clients.ini
configs/database/oracle/reporting.xml

They could be accessible by:
$config-&gt;database-&gt;mysql-&gt;news-&gt;someConfigElement;
$config-&gt;database-&gt;mysql-&gt;clients-&gt;someConfigElement;
$config-&gt;database-&gt;oracle-&gt;reporting-&gt;someConfigElement;

Wkr
Jeroen</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I like the idea. Apart from the caching/resource comment, which I agree 100% with, I think you should also have another look at the name to the config. The &#8220;XML&#8221; inside it is not clean and I wonder if it might be even nicer to have a level per dir:</p>
<p>Suppose you have these files:</p>
<p>configs/database/mysql/news.xml<br />
configs/database/mysql/clients.ini<br />
configs/database/oracle/reporting.xml</p>
<p>They could be accessible by:<br />
$config-&gt;database-&gt;mysql-&gt;news-&gt;someConfigElement;<br />
$config-&gt;database-&gt;mysql-&gt;clients-&gt;someConfigElement;<br />
$config-&gt;database-&gt;oracle-&gt;reporting-&gt;someConfigElement;</p>
<p>Wkr<br />
Jeroen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-518</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Thu, 24 Jun 2010 10:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-518</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-5699&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-5699&quot; rel=&quot;nofollow&quot;&gt;Sven&lt;/a&gt; :&lt;/strong&gt;
          &lt;p&gt;Nice example,&lt;br&gt;
but why don’t you use an Config Resoucre Plugin, or port your Class to an resource Plugin. &lt;/p&gt;
&lt;p&gt;Loading and generating Zend_Configs has a negative performance impact for your application the more configs you load and merge. Than you can use something like that for example:&lt;/p&gt;
&lt;p&gt;            if ($bootstrap-&gt;hasResource(’cachemanager’)) {&lt;br&gt;
                $bootstrap-&gt;bootstrap(’cachemanager’);&lt;br&gt;
                $manager = $bootstrap-&gt;getResource(’cachemanager’);&lt;br&gt;
                $cache   = $manager-&gt;getCache(’config’);&lt;br&gt;
            }&lt;/p&gt;
&lt;p&gt;and you can always retrieve the config object via the resource manager without loading all your files over and over.&lt;/p&gt;
         &lt;/blockquote&gt;

Yeah good idea. I will do it. Thank for reading my article.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-5699"><p>
<strong><a href="#comment-5699" rel="nofollow">Sven</a> :</strong></p>
<p>Nice example,<br />
but why don’t you use an Config Resoucre Plugin, or port your Class to an resource Plugin. </p>
<p>Loading and generating Zend_Configs has a negative performance impact for your application the more configs you load and merge. Than you can use something like that for example:</p>
<p>            if ($bootstrap-&gt;hasResource(’cachemanager’)) {<br />
                $bootstrap-&gt;bootstrap(’cachemanager’);<br />
                $manager = $bootstrap-&gt;getResource(’cachemanager’);<br />
                $cache   = $manager-&gt;getCache(’config’);<br />
            }</p>
<p>and you can always retrieve the config object via the resource manager without loading all your files over and over.</p>
</blockquote>
<p>Yeah good idea. I will do it. Thank for reading my article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sven</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-517</link>
		<dc:creator>Sven</dc:creator>
		<pubDate>Tue, 22 Jun 2010 14:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-517</guid>
		<description>Nice example,
but why don&#039;t you use an Config Resoucre Plugin, or port your Class to an resource Plugin. 

Loading and generating Zend_Configs has a negative performance impact for your application the more configs you load and merge. Than you can use something like that for example:

            if ($bootstrap-&gt;hasResource(&#039;cachemanager&#039;)) {
                $bootstrap-&gt;bootstrap(&#039;cachemanager&#039;);
                $manager = $bootstrap-&gt;getResource(&#039;cachemanager&#039;);
                $cache   = $manager-&gt;getCache(&#039;config&#039;);
            }

and you can always retrieve the config object via the resource manager without loading all your files over and over.</description>
		<content:encoded><![CDATA[<p>Nice example,<br />
but why don&#8217;t you use an Config Resoucre Plugin, or port your Class to an resource Plugin. </p>
<p>Loading and generating Zend_Configs has a negative performance impact for your application the more configs you load and merge. Than you can use something like that for example:</p>
<p>            if ($bootstrap-&gt;hasResource(&#8216;cachemanager&#8217;)) {<br />
                $bootstrap-&gt;bootstrap(&#8216;cachemanager&#8217;);<br />
                $manager = $bootstrap-&gt;getResource(&#8216;cachemanager&#8217;);<br />
                $cache   = $manager-&gt;getCache(&#8216;config&#8217;);<br />
            }</p>
<p>and you can always retrieve the config object via the resource manager without loading all your files over and over.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-516</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-516</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-5689&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-5689&quot; rel=&quot;nofollow&quot;&gt;Tom A&lt;/a&gt; :&lt;/strong&gt;
          &lt;p&gt;The understores in the echo are replaced with /… &lt;/p&gt;
&lt;p&gt;$config-&gt;database_mysql_news_xml-&gt;adapter means the adapter setting in /config/database/mysql/news.xml&lt;/p&gt;
         &lt;/blockquote&gt;

Thank &lt;strong&gt;Tom A&lt;/strong&gt; for commend. Example updated.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-5689"><p>
<strong><a href="#comment-5689" rel="nofollow">Tom A</a> :</strong></p>
<p>The understores in the echo are replaced with /… </p>
<p>$config-&gt;database_mysql_news_xml-&gt;adapter means the adapter setting in /config/database/mysql/news.xml</p>
</blockquote>
<p>Thank <strong>Tom A</strong> for commend. Example updated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom A</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-515</link>
		<dc:creator>Tom A</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-515</guid>
		<description>The understores in the echo are replaced with /... 

$config-&gt;database_mysql_news_xml-&gt;adapter means the adapter setting in /config/database/mysql/news.xml</description>
		<content:encoded><![CDATA[<p>The understores in the echo are replaced with /&#8230; </p>
<p>$config-&gt;database_mysql_news_xml-&gt;adapter means the adapter setting in /config/database/mysql/news.xml</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-514</link>
		<dc:creator>Muhammad</dc:creator>
		<pubDate>Mon, 21 Jun 2010 22:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-514</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-5687&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-5687&quot; rel=&quot;nofollow&quot;&gt;Henrique Mattos&lt;/a&gt; :&lt;/strong&gt;
          &lt;p&gt;This looks great. I just read it and will try to imlement this later in my project. What I want to be sure is that only calling the path to project/app/configs would load configuration files even if they are some deeper leves?&lt;/p&gt;
&lt;p&gt;To illustrate this:&lt;br&gt;
$config = My_Config(’path/to/project/app/configs’);&lt;br&gt;
would load the files in&lt;br&gt;
– project/app/configs&lt;br&gt;
– project/app/configs/database&lt;br&gt;
– project/app/configs/database/sql&lt;br&gt;
– project/app/configs/service&lt;/p&gt;
&lt;p&gt;???&lt;/p&gt;
         &lt;/blockquote&gt;

Thank for reading my article.
Of course you can use it.
Just put this class in your library folder and rename it as your autoloadernamespaces and test it.

But do you ever use Cache for config file? Did you think it&#039;s useful for better performance? I need your recommend to improve this class.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-5687"><p>
<strong><a href="#comment-5687" rel="nofollow">Henrique Mattos</a> :</strong></p>
<p>This looks great. I just read it and will try to imlement this later in my project. What I want to be sure is that only calling the path to project/app/configs would load configuration files even if they are some deeper leves?</p>
<p>To illustrate this:<br />
$config = My_Config(’path/to/project/app/configs’);<br />
would load the files in<br />
– project/app/configs<br />
– project/app/configs/database<br />
– project/app/configs/database/sql<br />
– project/app/configs/service</p>
<p>???</p>
</blockquote>
<p>Thank for reading my article.<br />
Of course you can use it.<br />
Just put this class in your library folder and rename it as your autoloadernamespaces and test it.</p>
<p>But do you ever use Cache for config file? Did you think it&#8217;s useful for better performance? I need your recommend to improve this class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrique Mattos</title>
		<link>http://mhf.ir/web/zend-config-tree-solution/#comment-513</link>
		<dc:creator>Henrique Mattos</dc:creator>
		<pubDate>Mon, 21 Jun 2010 18:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mhf.ir/?p=65#comment-513</guid>
		<description>This looks great. I just read it and will try to imlement this later in my project. What I want to be sure is that only calling the path to project/app/configs would load configuration files even if they are some deeper leves?

To illustrate this:
$config = My_Config(&#039;path/to/project/app/configs&#039;);
would load the files in
-- project/app/configs
-- project/app/configs/database
-- project/app/configs/database/sql
-- project/app/configs/service

???</description>
		<content:encoded><![CDATA[<p>This looks great. I just read it and will try to imlement this later in my project. What I want to be sure is that only calling the path to project/app/configs would load configuration files even if they are some deeper leves?</p>
<p>To illustrate this:<br />
$config = My_Config(&#8216;path/to/project/app/configs&#8217;);<br />
would load the files in<br />
&#8211; project/app/configs<br />
&#8211; project/app/configs/database<br />
&#8211; project/app/configs/database/sql<br />
&#8211; project/app/configs/service</p>
<p>???</p>
]]></content:encoded>
	</item>
</channel>
</rss>

