UML: Modeling php includes? How to?
I have a php application where some Web Pages are used for different purposes.
Depending on the value of one (or more) parameters being passed in the URL the page includes one or other php file with different functionality.
Let's say I have clients.php with the following code fragment:
<?php
$do=$_GET["do"];
switch($do){
case "":
include("clientes_display.php");
break;
case "addClient":
include("clientes_add.php");
break;
case "displayClient":
include("clientes_display.php");
break;
case "editClient":
include("clientes_edit.php");
break;
case "deleteClient":
开发者_Python百科 include("clientes_delete.php");
break;
?>
How do I model this kind of classes in an UML class diagram?
How do I model a specific instance of this class (a specific "page" resulting from being called with an specific value as ?do=displayClient)?
It would seem to me that you have implemented a dispatcher:
+----------------+ | PageDispatcher | +----------------+ | dispatch | +----------------+
精彩评论