CHAPTER 12 ■ ENTERPRISE PATTERNS
251
Recall this fragment:
<command name="AddVenue">
<view>addvenue</view>
<status value="CMD_OK">
<forward>AddSpace</forward>
</status>
</command>
Here is the call the parse code will make to add the correct element to the $viewMap property:
$map->addView( 'AddVenue', 0, 'addvenue' );
and here is the call for populating the $forwardMap property:
$map->addForward( 'AddVenue', 1, 'AddSpace' );
The application controller class uses these combinations in a particular search order. Let’s say the
AddVenue command has returned CMD_OK (which maps to 1, while 0 is CMD_DEFAULT). The application
controller will search the $forwardMap array from the most specific combination of Command and status
flag to the most ...