.
Felix Geisendorfer's Blog: Cake 1.2?s Set class eats nested arrays for breakfast!
Felix Geisendorfer has a great functionality note that CakePHP users might want to check out. It's related to the Set class and how it handles nested arrays. So far this has been a little dark spot for me in the core and from my previous quick looks at the class I've never been quite able to figure out what it's exact purpose was. Until now all I knew was well it's probably some fancy array manipulation code that is somewhat obfuscated and undocumented. Oh boy, I wish I had spent more time on this earlier. It's probably one of coolest new features in 1.2 and nobody realizes it. He starts with a simple example of how the class works with a nested array of user information. Normally, you'd loop through the array and append the values you'd need to another array (like the user's name), but with Set, it's as simple as calling the static extract method with the path to what you want out of the array. A simple oneline replacement for a (normally) three to four line bit of code. He gives a few other examples using this same user information, grabbing various results and includes one at the end that is very nice indeed pulling in an XML document, running it through a simple xmltoArray function and pulling out the titles in a few easy lines.
Read the full story
 

( back to top )
LEAR Web Design | LEAR Corporation | How LEAR Corp Works | Welcome To My Site | Learn PHP
South Florida Web Design | Broward Web Design | Miami-Dade Web Design | Palm Beach Web Design
Coral Springs Web Design | Deerfield Beach Web Design | Fort Lauderdale Web Design | Hollywood Web Design | Pompano Beach Web Design | Weston Web Design
Boca Raton Web Design | Boynton Beach Web Design | Delray Beach Web Design | Lantana Web Design | West Palm Beach Web Design
Aventura Web Design | Bal Harbour Web Design | North Miami Beach Web Design | North Miami Web Design | Miami Web Design | South Beach Miami Web Design
Atlanta | Boston Web Design | New York Web Design | Philadelphia Web Design | Pittsburgh
Los Angeles | San Diego | San Francisco | Sacramento | San Jose | Santa Clara | Mountain View | Sunnyvale
Appleton | Eau Claire | Green Bay | Milwaukee | Sturgeon Bay | Wausau | Denver

Copyright © 2003-2007 LEAR Web Design.
A South Florida Web Design Firm | SEO Consultant