Summary of Changes

In this chapter, we've built upon the simple DirectoryItems class that was introduced in Chapter 4 to produce an expanded and upgraded class. As you've seen, you needed to make surprisingly few changes to this class in order to implement some of the key changes introduced with PHP 5.

Certainly, the changes described in this chapter are not the only changes to PHP's OO capabilities; however, one of them—the use of access modifiers—is possibly the most important. The single most glaring shortcoming of OO programming in PHP 4 is this lack of access modifiers. While disciplined use and careful documentation can take you part of the way toward mitigating this deficiency, it's much better to rely on the structure of the language to enforce the appropriate use of an object.

Not only have you upgraded the DirectoryItems class, but you've also expanded its functionality with a view to using it to display a series of images. The ugly duckling class is well on its way to becoming a full-fledged swan.

The DirectoryItems class was created in order to display a directory of images. Further changes are needed to perform this task properly but these changes require the creation of additional classes. In Chapter 6 let's look at creating a thumbnail image class to produce thumbnails of images.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.65