Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2009-09-22 02:53
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
// ...