added PanaceaTemplateView

This commit is contained in:
tmont 2008-10-15 07:04:11 +00:00
parent 4222880c0d
commit 44e5dcba18
4 changed files with 67 additions and 3 deletions

View File

@ -1,4 +1,4 @@
RewriteEngine On
RewriteCond %{REQUEST_URI} !.*index\.php
RewriteRule .+ /wiki/index.php [L]
RewriteRule .+ /panacea/src/index.php [L]

View File

@ -30,6 +30,7 @@
break;
case 'PanaceaPageView':
case 'PanaceaTemplateView':
$file = "$path/lib/views/$className.php";
break;
}

View File

@ -46,7 +46,7 @@
* @uses HttpUtil::getRequestMethod()
*
* @throws {@link InvalidRequestException} if a {@link View} cannot be created
* @return View
* @return PanaceaTemplateView
*/
public function handleRequest(Request $request = null) {
if (!($request instanceof Request)) {
@ -54,7 +54,9 @@
}
try {
return $this->viewFactory->getView($this->page, $request->__toString());
$templateView = new PanaceaTemplateView();
$templateView->addView($this->viewFactory->getView($this->page, $request->__toString()));
return $templateView;
}
catch (ClassNotFoundException $e) {
throw new InvalidRequestException($request);

View File

@ -0,0 +1,61 @@
<?php
/**
* PanaceaTemplateView
*
* @package Panacea
* @subpackage Views
* @author Tommy Montgomery
* @since 2008-10-14
*/
/** Bootstraps the NowhereConcave framework */
require_once 'NowhereConcave/bootstrap.php';
/**
* Template for the <i>Panacea</i> application
*
* @package Panacea
* @subpackage Views
* @author Tommy Montgomery
* @since 2008-10-14
*/
class PanaceaTemplateView extends TemplateView {
/**
* Creates a new {@link TemplateView}
*
* @author Tommy Montgomery
* @since 2008-10-14
*/
public function __construct() {
parent::__construct();
$this->defaultTitle = 'Panacea';
}
/**
* Gets all meta data associated with this view
*
* @author Tommy Montgomery
* @since 2008-10-14
*
* @return ViewMetaData
*/
public function getMetaData() {
return parent::getMetaData();
}
/**
* Renders the view
*
* @author Tommy Montgomery
* @since 2008-10-14
*/
public function send() {
parent::send();
}
}
?>