PHP Classes

File: controller.xml

Recommend this page to a friend!
  Classes of None  >  PHP Controller  >  controller.xml  >  Download  
File: controller.xml
Role: Auxiliary data
Content type: text/plain
Description: example controller xml file which controller.class loadds
Class: PHP Controller
Implements a controller of MVC applications
Author: By
Last change: upgraded to new schema and changed some examples
Date: 11 years ago
Size: 2,399 bytes


Class file image Download
<?xml version="1.0" encoding="UTF-8"?>
<controller xmlns="" xmlns:xsi="" xsi:schemaLocation=" controller.xsd">
  <!-- schema version number -->
  <!-- must end in slash -->
  <!-- must end in slash -->

  <!-- this is the form user will be presented to login -->
    <!-- a class must exist with this name, and it will handle auth -->
		<login-forward method-name="login">administrator</login-forward>
		<logout-forward method-name="logout">administrator</logout-forward>    

	<!-- we can have infinate of these -->
    <!-- this will be the name accessed in url -->
    <!-- and this the class that will be loaded -->
    <!-- if a template is used, this is the template name -->
    <!-- this only appears in one "page" -->
    <!-- if no method is defined in URL, this is called -->
    <!-- after form submission the application will be forward to this page-->
    <form-forward method-name="addMessageAction">forum/messages</form-forward>
    <!-- after form submission the application will be forward to this page--> 
    <form-forward method-name="doAddUser">administrator</form-forward>
    <!--roles retrieved from authentication database and defined in $_SESSION['role'] -->


    <!-- must follow the rule: Class/Method?arg=1 -->

    <!-- the alias name in the url -->
    <!-- must follow the rule: Class/Method?arg=1 -->
		<page>administrator/addUser?firstname=eddie tejeda</page><!-- spaces allowed -->