August 2016
Intermediate to advanced
286 pages
5h 31m
English
Even though we have Model View Controller separation now, we may still have many include calls in our classes. We want our legacy application to be free from the artifacts of its include-oriented heritage, where merely including a file causes logic to be executed. To do so, we will need to replace include calls with method calls throughout our classes.
For the purposes of this chapter, we will use the term include to cover not just include but also require, include_once, and require_once.
Let's say we extracted some action logic with an embedded include to a Controller method. The code receives information on a new user, calls an include to perform some common validation functionality, ...
Read now
Unlock full access