O'Reilly logo

PHP Objects, Patterns, and Practice, Second Edition by Matt Zandstra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6Objects and Design

Now that we have seen the mechanics of PHP's object support in some detail, in this chapter, we step back from the details and consider how best to use the tools that we have encountered. In this chapter, I introduce you to some of the issues surrounding objects and design. We will also look at the UML, a powerful graphical language for describing object-oriented systems.

This chapter will cover

  • Design basics: What I mean by design, and how object-oriented design differs from procedural code
  • Class scope: How to decide what to include in a class
  • Encapsulation: Hiding implementation and data behind a class's interface
  • Polymorphism: Using a common supertype to allow the transparent substitution of specialized subtypes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required