O'Reilly logo

Pro PHP Refactoring by Jacopo Romei, Francesco Trucchia

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

C H A P T E R  9

image

Dealing with Data Rationalization

Encapsulation means the hiding of data and behavior from a client. It is a key object-oriented concept and, in some ways, the key to object-oriented programming. Since our goal is to make each part as independent as possible from anything external, classes and methods should receive as much information as is needed to satisfy the task they are meant for.

Anyone interested in good object-oriented development cares about encapsulation and is likely concerned with hiding or exposing the best data structure in their object, depending on the needed architecture. In this chapter we'll learn how to ...

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