Object-Oriented PHP: Concepts, Techniques, and Code

Front Cover
No Starch Press, 2006 - Computers - 216 pages

It can be tough to learn the concepts of object-oriented programming with a language like C++. Fortunately, PHP's simple object model makes it an ideal language for learning about object-oriented programming.

For the uninitiated, this guide to the latest version of PHP offers a speedy introduction to object-oriented programming, including a thorough explanation of classes as well as coverage of constructors, destructors, inheritance, polymorphism, and interfaces. In this easy-to-follow, example-filled guide, new concepts are coupled with fully-functional, ready-to-use PHP classes (all available for download from the book’s companion website,http://objectorientedphp.com).

You’ll learn to:

* Promote code reuse by creating your own classes and using built-in classes
* Customize and improve classes through inheritance
* Simplify database access by developing MySQL database and result set classes
* Incorporate an RSS reader into your site using only four lines of code
* Use XML easily with an object-oriented approach
* Employ PHP to autogenerate documentation for your code
* Make thumbnail images on the fly
* Replace clumsy error trapping with exception handling
* Take full advantage of advanced OO features in PHP
* Incorporate AJAX into your OO PHP code

Object-Oriented PHP will show you how to maximize PHP’s features, with much less work than you might think. With Object-Oriented PHP, you can master the basics of object-oriented programming and get up to speed on PHP in one fell swoop.

 

What people are saying - Write a review

User ratings

5 stars
6
4 stars
0
3 stars
2
2 stars
0
1 star
0

User Review - Flag as inappropriate

dfgdfgfdg

User Review - Flag as inappropriate

I've tried to learn object oriented programming (OOP) before on my own. I understood the concepts, but was still unable to apply the concepts to something usable. The most appealing aspect of this book, to me, was the fact the author did not use the ol' "Dog Class" or "Person Class" approach. He actually helps you to build a class for something you would build in the real world. This really helped me see how OOP is used and why it's beneficial. I recommend this book! 

Contents

CHAPTER 1 WHAT A TANGLED WEB WE WEAVE
1
CHAPTER 2 BASICS OF OBJECTORIENTED PROGRAMMING
5
CHAPTER 3 OBJECTORIENTED FEATURES NEW TO PHP 5
11
CHAPTER 4 SHOW A LITTLE CLASS
17
CHAPTER 5 MOD UR CLASS
25
CHAPTER 6 THE THUMBNAILIMAGE CLASS
35
CHAPTER 7 BUILDING THE PAGENAVIGATOR CLASS
47
CHAPTER 8 USING THE PAGENAVIGATOR CLASS
57
CHAPTER 12 KEEPING IT FRESH
99
CHAPTER 13 MORE MAGIC METHODS
111
CHAPTER 14 CREATING DOCUMENTATION USING THE REFLECTION CLASSES
125
CHAPTER 15 EXTENDING SQLITE
139
CHAPTER 16 USING PDO
157
APPENDIX A SETTING UP PHP 5
165
PHP 4 AND PHP 5
169
GLOSSARY
173

CHAPTER 9 DATABASE CLASSES
65
CHAPTER 10 IMPROVEMENT THROUGH INHERITANCE
75
CHAPTER 11 ADVANCED OBJECTORIENTED PROGRAMMING CONCEPTS
91

Common terms and phrases

About the author (2006)

Peter Lavin writes regularly on all things tech, from technology book reviews to web design, and runs a web development firm based in Toronto. He has been published in a number of magazines and online sites, including UnixReview.com and Doctor Dobb's Journal, and is a contributor to PHP Hacks (O'Reilly).

Bibliographic information