<?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;
}
}
?>
|