Home arrow PHP arrow Expanding an Error Logger with the Chain of Responsibility Pattern

Expanding an Error Logger with the Chain of Responsibility Pattern

Do you want to know how to build an error logging system using the chain of responsibility schema with PHP? If your answer is a loud yes, then in this group of articles you’ll find what you’ve been looking for! Welcome to the concluding part of the series “Understanding the chain of responsibility between PHP objects.” This set of three tutorials shows you how to define a specific chain of responsibility that involves several PHP objects, and applies this concept to creating an expandable error logging mechanism.

  1. Expanding an Error Logger with the Chain of Responsibility Pattern
  2. The error logging system's responsibility chain
  3. Expanding the basic error logging system
  4. Logging errors when something goes wrong
  5. The error logging system in action
By: Alejandro Gervasio
Rating: starstarstarstarstar / 3
November 13, 2006

print this article



After introducing you to the subject of this series, I'd like to step back quickly to the previous tutorial and recall the topics covered in it. This will make it a bit easier for you to grasp the concepts that I plan to explain in this final part.

As you'll possibly remember, in the previous article I went through the development of a comprehensive error logging system. It used the chain of responsibility pattern to establish the scope of where each involved PHP class should act.

By following this approach, it was feasible to create an error handling mechanism where every component was initially provided with a limited capacity for processing a particular failure -- and when the error in question couldn't be properly handled, it would be immediately transferred to the corresponding parent module.

Indeed, if you reread the above paragraph, it should be clear to you what a chain of responsibility is all about: once a group of hierarchically organized classes have been created, the responsibility for handling a given task is moved from the bottom to the top of the stack structure. Sounds good, doesn't it?

Now, paying attention to the topics that will be covered in this tutorial, what you'll learn here will consist essentially of applying the chain of responsibility schema to expand the capacity of the error logging system that was developed  previously.

Are you intrigued about how this will done? Then click the link below and keep reading!

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: