Location: PHPKode > scripts > Dispatcher > dispatcher/EventHandler.php
<?php
/**
 * @li gnu/agpl v3 or later
 * @code utf8
 * @version 0.1
 * @author cojack from Aichra.pl
 * @date 22.09.09
 *
 **/

/**
 * We require a Handled interface
 */
require_once('./Handled.php');

/**
 * @class EventHandler
 * @implements Handled
 * @access abstract
 * 
 * We'll extending from this class,
 * so for example we can here storage a function with access protected to connect to db
 * and we have to have a public function implemented from interface Handled a handledEvent()
 *
 */

abstract class EventHandler implements Handled {

  /**
   * @method dbConn
   * @access public
   * @param void
   * @return resource - db handle
   * 
   * Method to connect to db
   * 
   */
  protected function dbConn() {
    // some connection to db
    $dbHandle = true; // only for example
    return $dbHandle;
  }

  /**
   * @method handedEvent()
   * @param void
   * @access public
   * 
   */
  public function handledEvent() {}
}
Return current item: Dispatcher