News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Introducing Mediator Classes in PHP 5
March 13, 2007 @ 11:22:00

DevShed starts off another design patterns series with this new article introducing the Mediator class pattern - a method to keep things up to date and synchronized in your PHP application.

Well, in this case, the synchronization between a group of PHP classes can be made by implementing a useful pattern widely known as "mediator." In short, when the mediator pattern is applied, there's a single class that implements the logic required to keep all the other classes completely synchronized with each other. This means that not only will all the modifications introduced by one class be reflected in the others, but that those changes will be performed via the interface of the mediator class.

They Apply this pattern with their traditional example of working with files - this time the class will handle the communication (and syncing) between two file handling objects. They add a file handling class on to the back end and apply them both in an example that lets you manipulate the data inside both files at the same time.

0 comments voice your opinion now!
php5 mediator designpattern tutorial class file handler content php5 mediator designpattern tutorial class file handler content


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Error Handling in PHP 5

IBM developerWorks: 30 game scripts you can write in PHP, Part 1: Creating 10 fundamental scripts

FrSIRT: Vivvo Article Management CMS SQL Injection and PHP File Inclusion Vulnerabilities

Sameer Borate's Blog: Generating a color palette from a image in php

Nefarious Designs: Object-Oriented PHP Part 4: PHP5's Improved Features


Community Events

Don't see your event here?
Let us know!


release podcast library unittest extension interview opinion series language feature voicesoftheelephpant threedevsandamaybe introduction development community wordpress laravel laravel5 framework api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework