O'Reilly logo

Pro PHP: Patterns, Frameworks, Testing and More by Kevin McArthur

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

PART 1OOP and Patterns

CHAPTER 1Abstract Classes, Interfaces, and Programming by Contract

In this chapter, you will learn about abstract classes, interfaces, and a technique known as programming by contract. These are object-oriented programming (OOP) mechanisms that allow you to write code that does more than just perform calculations or present output. These constructs give you the ability to define conceptual rules about how classes interact, and they provide a foundation for extension and customization in your applications.

Abstract Classes

Abstract classes involve the use of a common base class when you want to leave certain details up to its inheritors—specifically, when you need to create a foundational object whose methods are not fully ...

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