News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Using Directory Iterators to Build Loader Apps in PHP
July 06, 2009 @ 10:17:11

DevShed finishes off their "loader" series of tutorials today with this eighth part focusing on the use of Directory Iterators.

Here's where the SPL comes in, since it's possible to use a combination of its "spl_autoload_register()" function and its RecursiveDirectoryIterator class to refactor the method in question and make it shorter and tighter. In this final chapter of the series I'm going to improve the loader class developed in the previous one by incorporating some of the aforementioned SPL functions and classes.

They change up their code to use a RecursiveDirectoryIterator inside of their __autoload to remove their custom recursive code.

0 comments voice your opinion now!
tutorial autoload recursive iterator directory spl


blog comments powered by Disqus

Similar Posts

Juozas Kaziukenas' Blog: Zend Framework and Doctrine. Part 1

Developer.com: SQLite: The Sensible Database Solution

Federico Cargnelutti' Blog: Adding theme support to your Zend Framework application

Lorna Mitchell's Blog: Building A RESTful PHP Server: Routing the Request

PHPMaster.com: Constructors and the Myth of Breaking the Liskov Substitution Principle


Community Events





Don't see your event here?
Let us know!


language application package podcast voicesoftheelephpant laravel interview library series release update framework community security opinion version tool symfony introduction composer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework