views:

51

answers:

1

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":
     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)?

+1  A: 

It would seem to me that you have implemented a dispatcher:

+----------------+
| PageDispatcher |
+----------------+
| dispatch       |
+----------------+
Frank Krueger
@Frank: Thank you. So, if I model a Clients class I could draw objects like clientsAdd : Clients? Could that be correct for UML?
vmarquez