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 ...

Get PHP Objects, Patterns, and Practice, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.