News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

PHPImpact Blog:
5 great articles on SPL Iterators
August 07, 2008 @ 09:35:03

On the PHP::Impact blog today Federico points out five articles that can help you learn more about the Standard PHP Library, specifically in dealing with iterators.

When PHP 5 was initially released, it included a strong sense of standardization introduced in the core package. This can be a real time saver when common programming issues must be solved through proven, standard solutions. That's precisely the case with iterators, since the SPL package includes many predefined iterating classes that can be used for traversing different data structures, without having to reinvent the wheel over and over again.

The links include this article on phpro.org and this one on Zend's own site.

0 comments voice your opinion now!
spl iterators link resource tutorial php5



DevShed:
Iterators in the Simplest Sense - Traversing Different Data Structures
March 15, 2006 @ 12:50:40

DevShed has posted the second part in their "Iterators in the Simplest Sense" series - this time focusing on traversing different data structures.

Welcome to the second tutorial of the series "Iterators in the simplest sense." Just in case you didn't know, this series introduces Iterators in PHP 4 - PHP 5, explaining their basic concepts, and teaches you how to use them in practical projects, which can be utilized as part of larger PHP applications.

By the end of this tutorial, I hope you'll have an accurate idea of how to use a generic Iterator structure. I will show how it is useful for traversing different data structures by providing specific implementations for each of the abstract methods defined within the base Iterator class.

They look first at extending the code that they had before by making an interator to work with a MySQL connection. They discuss how it will all work prior to coding (plan first, code later) before moving into the actual coding process and creating the class. The iterator, once extended, provides an interface between you and the normal MySQL functions, making it easier to handle the results from your queries (with things like "countAffectedRows" and "seekRow").

0 comments voice your opinion now!
php iterators data structures files mysql php iterators data structures files mysql



Community Events









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


cakephp application zend ajax developer code zendframework mysql release conference database framework PEAR security package example PHP5 releases job book

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