PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1

CHAPTER 12 ■ ENTERPRISE PATTERNS


Here is the view associated with the AddVenueController class:

<?php
require_once( "woo/base/RequestRegistry.php" );
$request = \woo\base\RequestRegistry::getRequest();
?>




Add Venue


Add Venue







print $request->getFeedbackString("
");
?>







As you can see, the view does nothing but display data and provide the mechanism for generating a
new request. The request is made to the PageController, not back to the view. Remember, it is the
PageController class that is responsible for processing requests.
You can see an overview of this more complicated version of the Page Controller pattern in Figure
12–9.

Free download pdf