<?PHP/*Page Controller mode: As I understand it, it separates the business logic from the view (usually the easiest way to do this is to mix PHP and HTML code in a file), which is a business logic file that corresponds to a view file. The code example is annotated as follows:*///Page Controller Modenamespace Woo\controller;//business logic file (file name addvenue.php)Abstract classPagecontroller {//base class Private $request; function__construct () {$request= \woo\base\requestregistry::getrequest ();//get a class that handles user request information through the registry class if(Is_null($request)){ $request=NewRequest (); } $this->request =$request; } Abstract functionprocess (); functionForward$resource){//Jump include($resource); Exit(0); } functiongetrequest () {return $this-request; }}classAddvenuecontrollerextendsPagecontroller {//The function of this class is to write a venue data to the database (similar to the data table structure: id,name) functionprocess () {Try{ $request=$this-getrequest (); $name=$request->getproperty (' Venue_name ');//get the name of the venue that the user submitted if(Is_null($request->getproperty (' submitted ')) {//determine if the form is submitted or not, jump to add_nenue.php $request->addfeedback ("Choose a name for the venue"); $this->forward (' add_nenue.php '); } Else if(Is_null($name)){//determine if a form submission has a name $request->addfeedback ("Name is a required field"); $this->forward (' add_venue.php ');//Jump add_venue.php } $venue=New\woo\domain\venue (NULL,$name);//creating an object adds it to the database, and the internal business logic does not have to delve into it. $this->forward ("listvenues.php");//add success after jump listvenues.php, that is, a list of data display interface}Catch(Exception $e){ $this->forward (' error.php ');//jump to an error interface } }}$controller=NewAddvenuecontroller ();//The process () method that executes this class$controller-process ();? ><?PHP//View file (file name add_venue.php)require_once("woo/base/requestregistry.php");$request= \woo\base\requestregistry::getrequest ();? >Print $request->getfeedbackstring (' </td></tr><tr><td> ')?> </td> </tr> </table& Gt <form action= "addvenue.php" method= "get" > <input type= "hidden" name= "submitted" value= "Yes"/> & Lt;input type= "text" name= "Venue_name"/> </form></body>PHP Object-oriented page controller