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,33 +1,20 @@
<?php
/**
* Autorender Controller Plugin
*
* @author Karl Pannek <info@katharsis.in>
* @version 0.5.2
* @package Katharsis
*/
class Katharsis_Controller_Plugin_Autorender extends Katharsis_Controller_Plugin_Abstract
{
/**
* Renders a controller/action.phtml template automaticly after processing controller
*
* @return void
*/
public function postController()
{
$view = Katharsis_View::getInstance();
$view->controllerAction = false;
$templateName = strtolower(Katharsis_Request::getControllerName()) . DIRECTORY_SEPARATOR . strtolower(Katharsis_Request::getActionName());
if(file_exists('application/view' . DIRECTORY_SEPARATOR . $templateName . '.phtml'))
{
$view->controllerAction = $templateName;
}
$view = Katharsis_View::getInstance();
echo $view->render('main');
}
}
<?php
class Katharsis_Controller_Plugin_Autorender extends Katharsis_Controller_Plugin_Abstract
{
public function postController()
{
$view = Katharsis_View::getInstance();
$view->stageContent = false;
$templateName = ucfirst(Katharsis_Request::getControllerName()) . DIRECTORY_SEPARATOR . strtolower(Katharsis_Request::getActionName());
if(file_exists(getcwd() . '/application/view' . DIRECTORY_SEPARATOR . $templateName . '.phtml'))
{
$view->stageContent = $view->render($templateName);
}
echo $view->render('main');
}
}
?>