added PanaceaTemplateView
This commit is contained in:
parent
4222880c0d
commit
44e5dcba18
@ -1,4 +1,4 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
RewriteCond %{REQUEST_URI} !.*index\.php
|
RewriteCond %{REQUEST_URI} !.*index\.php
|
||||||
RewriteRule .+ /wiki/index.php [L]
|
RewriteRule .+ /panacea/src/index.php [L]
|
@ -30,6 +30,7 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'PanaceaPageView':
|
case 'PanaceaPageView':
|
||||||
|
case 'PanaceaTemplateView':
|
||||||
$file = "$path/lib/views/$className.php";
|
$file = "$path/lib/views/$className.php";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
* @uses HttpUtil::getRequestMethod()
|
* @uses HttpUtil::getRequestMethod()
|
||||||
*
|
*
|
||||||
* @throws {@link InvalidRequestException} if a {@link View} cannot be created
|
* @throws {@link InvalidRequestException} if a {@link View} cannot be created
|
||||||
* @return View
|
* @return PanaceaTemplateView
|
||||||
*/
|
*/
|
||||||
public function handleRequest(Request $request = null) {
|
public function handleRequest(Request $request = null) {
|
||||||
if (!($request instanceof Request)) {
|
if (!($request instanceof Request)) {
|
||||||
@ -54,7 +54,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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) {
|
catch (ClassNotFoundException $e) {
|
||||||
throw new InvalidRequestException($request);
|
throw new InvalidRequestException($request);
|
||||||
|
61
src/lib/views/PanaceaTemplateView.php
Normal file
61
src/lib/views/PanaceaTemplateView.php
Normal 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user