[pLog-svn] r1929 - plog/branches/plog-1.0.1/class/plugin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Mon May 2 21:50:26 GMT 2005
Author: oscar
Date: 2005-05-02 21:50:26 +0000 (Mon, 02 May 2005)
New Revision: 1929
Modified:
plog/branches/plog-1.0.1/class/plugin/pluginbase.class.php
Log:
added an error message, instead of having to check apache's error_log file to see what the heck was going on when we get nice blank pages...
Modified: plog/branches/plog-1.0.1/class/plugin/pluginbase.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/plugin/pluginbase.class.php 2005-05-02 21:31:50 UTC (rev 1928)
+++ plog/branches/plog-1.0.1/class/plugin/pluginbase.class.php 2005-05-02 21:50:26 UTC (rev 1929)
@@ -335,5 +335,20 @@
return( File::isReadable( $path ));
}
+
+ /**
+ * this method must be implemented by plugins that wish to "listen" for events
+ * It will throw an Exception by default, since it means that the plugin registered for
+ * an event but no implementation of the process() method is provided
+ *
+ * @param eventType The event identifier.
+ * @param params An array with the parameters thrown by the event. The parameters are
+ * dependant on the event.
+ */
+ function process( $eventType, $params )
+ {
+ throw( new Exception( "Plugin ".$this->id." registered for event $eventType but did not provide its own process() method!" ));
+ die();
+ }
}
?>
More information about the pLog-svn
mailing list