PHP Classes

File: _classes/_handlers/AllEventsHandler.class.php

Recommend this page to a friend!
  Classes of Marius Zadara   Logger   _classes/_handlers/AllEventsHandler.class.php   Download  
File: _classes/_handlers/AllEventsHandler.class.php
Role: Class source
Content type: text/plain
Description: Handler to accept all the events
Class: Logger
Filter and export data of application events
Author: By
Last change:
Date: 15 years ago
Size: 1,087 bytes
 

Contents

Class file image Download
<?php

/**
 * Custom event handler.
 * This class will accept all the events, regardless its definitions.
 *
 * @author Marius Zadara <marius@zadara.org>
 * @category org.zadara.marius.logger.classes.handlers
 * @copyright (C) 2008 Marius Zadara <marius@zadara.org>
 * @license GNU GPL
 * @package org.zadara.marius.logger
 * @final
 */
final class AllEventsHandler extends EventHandler
{
   
/**
     * Default class constructor.
     *
     * @param String $uniqueId The handler's unique id - accepts null (in this case will be generated a random one)
     * @return AllEventsHandler
     */
   
public function AllEventsHandler($uniqueId = null)
    {
       
// init the parent
       
parent::EventHandler($uniqueId);
    }

   
   
/**
     * Custom implementation of the event acceptance function.
     * With this implementation, all the events will be accepted,
     * regardless their definition
     *
     * @param Event $event The new event
     * @return true
     */
   
public function isEventAccepted($event)
    {
       
// accept the event regardless its definition
       
return true;
    }
}


?>