PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Przemek Czekaj   Dispatcher   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example in index.php
Class: Dispatcher
Dispatch events to registered handler classes
Author: By
Last change:
Date: 14 years ago
Size: 452 bytes
 

Contents

Class file image Download
<?php
/**
 * @li gnu/agpl v3 or later
 * @code utf8
 * @version 0.1
 * @author cojack from Aichra.pl
 * @date 22.09.09
 *
 **/

require_once ('Dispatcher.php');

$disObj = new Dispatcher($_GET['event']);
$disObj->handleEvent();

//tpl etc...
// ...
// ...

// using some templates (Smarty here)
//$tpl->assign('content',$disObj->getResponse());

// or plain text
echo $disObj->getResponse();

// set the ulr to index.php?event=show

// else code
// ...