The RequestHelper and DataStore Classes

The RequestHelper class acts like a notice board for our application. Different objects leave messages on it that others might find useful. This is a useful solution to the problem of sharing information between applications and tiers because we allow information to move between objects that might otherwise have no knowledge of one another. Listing 24.2 shows our RequestHelper class.

Listing 24.2. The RequestHelper Class
 1: <? 2: // controller/RequestHelper.php 3: // qframe license: http://resources.corrosive.co.uk/pkg/qframe/license.txt 4: 5: require 'command/DataStore.php'; 6: 7: class RequestHelper { 8: private $params = array (); 9: private $commandArray = array (); 10: private $datastore; 11: 12: ...

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.