I have done a way before, but it involved a little bit of eval(),
which I've heard isn't all that efficient. And considering the
Configure::read() method is used a fair amount, efficiency would
probably be a good idea.

For some reason, I've also tried replacing the current setup with a
Set::extract($name, $_this); within the method, but (I think) a fatal
error was generated (script halted, and there was no output - so I
assumed it was fatal). If only it was as simple as a Set::extract
(); :)

On Aug 21, 2:01 pm, brian <bally.z...@gmail.com> wrote:
> Use the source:
>
> http://api.cakephp.org/view_source/configure/#line-326
>
> It's hard-coded in the sense that there's a switch block that tests
> the number of names provided. I have a feeling there's a really
> elegant way to do this for unlimited names but i'm still on my first
> cup of joe. So, i might still be dreaming.
>
> On Fri, Aug 21, 2009 at 7:13 AM, geoff<garbet...@gmail.com> wrote:
>
> > Hey all. Maybe this solution is really simple, and I'm just not
> > getting it.
>
> > But I've noticed that when using Configure::read() with dot notation
> > (e.g.: Configure::read('level1.level2.level3')), it only seems to go
> > down three levels. However, Set::extract() can go multiple levels
> > down.
>
> > Is there a reason for Configure::read() only going down three levels?
> > It'd be nice to access levels lower down (e.g. fourth and fifth
> > levels).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to