initial commit

This commit is contained in:
logsol 2011-04-08 03:27:38 +12:00
commit f2ff442d8a
21 changed files with 1559 additions and 0 deletions

View file

@ -0,0 +1,53 @@
<?php
/**
* Central Plugin Class
*
* @author Karl Pannek <info@katharsis.in>
* @version 0.5.2
* @package Katharsis
*/
class Katharsis_Controller_Plugin
{
/**
* @var array
*/
protected static $_plugins;
/**
* Register all plugins with this method
* Plugins will be called in the same order as they have been registered
*
* @param object $object - an instance of your plugin
* @return void
*/
public static function registerPlugin($object)
{
self::$_plugins[] = $object;
}
/**
* Processes preController methods of all plugins
*
* @return void
*/
public static function preControllerHook()
{
foreach(self::$_plugins as $plugin)
{
$plugin->preController();
}
}
/**
* Processes postController methods of all plugins
*
* @return void
*/
public static function postControllerHook()
{
foreach(self::$_plugins as $plugin)
{
$plugin->postController();
}
}
}