cleaned project, repaired router

This commit is contained in:
Logsol 2013-07-08 22:52:36 +02:00
parent 2156d3f5c6
commit bffe0f1660
16 changed files with 1172 additions and 1440 deletions

View file

@ -1,53 +1,27 @@
<?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();
}
}
}
<?php
class Katharsis_Controller_Plugin
{
protected static $_plugins;
public static function registerPlugin($object)
{
self::$_plugins[] = $object;
}
public static function preControllerHook()
{
foreach(self::$_plugins as $plugin)
{
$plugin->preController();
}
}
public static function postControllerHook()
{
foreach(self::$_plugins as $plugin)
{
$plugin->postController();
}
}
}
?>