CHAPTER 19

images

Extending

One of the biggest differentiators of popular frameworks is how easily they can be extended with third-party libraries. Up until now, all the classes we have developed have belonged either to the framework or to the application.

Goals

  • We need to understand how we can create our own libraries.
  • We need to understand how we can use libraries from other developers.
  • We need to understand what the Observer design pattern is and why it’s relevant to our application.
  • We need to build a means of listening for and emitting events within our applications.

Foxy

The first kind of library we will look at is the kind we create ourselves. ...

Get Pro PHP MVC 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.