updating code to conform to the naming scheme

This commit is contained in:
tmont 2008-10-15 06:35:55 +00:00
parent e0bec3a5c8
commit 4222880c0d
5 changed files with 41 additions and 41 deletions

View File

@ -23,14 +23,14 @@
$path = dirname(__FILE__);
$file = '';
switch ($className) {
case 'WikiControllerFactory':
case 'WikiPageController':
case 'WikiViewFactory':
$file = "$path/inc/$className.php";
case 'PanaceaControllerFactory':
case 'PanaceaPageController':
case 'PanaceaViewFactory':
$file = "$path/lib/$className.php";
break;
case 'WikiPageView':
$file = "$path/inc/views/$className.php";
case 'PanaceaPageView':
$file = "$path/lib/views/$className.php";
break;
}

View File

@ -1,11 +1,11 @@
<?php
/**
* WikiControllerFactory
* PanaceaControllerFactory
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
/** Bootstraps the NowhereConcave framework */
@ -14,16 +14,16 @@
/**
* Creates a {@link Controller}
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
class WikiControllerFactory extends ControllerFactory {
class PanaceaControllerFactory extends ControllerFactory {
/**
* The <kbd>WikiControllerFactory</kbd> instance
* The <kbd>PanaceaControllerFactory</kbd> instance
*
* @var Dispatcher
* @var PanaceaControllerFactory
*/
protected static $instance = null;
@ -33,7 +33,7 @@
* @author Tommy Montgomery
* @since 2008-10-05
*
* @return ControllerFactory
* @return PanaceaControllerFactory
*/
public static function getInstance() {
if (self::$instance === null) {
@ -52,14 +52,14 @@
*
* @param array $uriFragments The URI fragments
* @throws {@link ClassNotFoundException}
* @return WikiPageController
* @return PanaceaPageController
*/
public function getController(array $uriFragments) {
if (count($uriFragments) !== 1) {
throw new InvalidTypeException(1, 'array of size 1', $uriFragments);
}
return new WikiPageController($uriFragments[0]);
return new PanaceaPageController($uriFragments[0]);
}
}

View File

@ -1,31 +1,31 @@
<?php
/**
* WikiPageController
* PanaceaPageController
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
/** Bootstraps the NowhereConcave framework */
require_once 'NowhereConcave/bootstrap.php';
/**
* Wiki page controller
* Panacea page controller
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
class WikiPageController extends Controller {
class PanaceaPageController extends Controller {
/**
* Creates a new {@link Controller}
*
* @author Tommy Montgomery
* @since 2008-10-05
* @uses DefaultViewFactory::getInstance()
* @uses PanaceaViewFactory::getInstance()
*
* @param string $page Name of the page (view)
* @param int $viewType One of the {@link View}<kbd>::VIEWTYPE_*</kbd> constants
@ -33,7 +33,7 @@
*/
public function __construct($page = '', $viewType = View::VIEWTYPE_HTML) {
parent::__construct($page, $viewType);
$this->viewFactory = WikiViewFactory::getInstance();
$this->viewFactory = PanaceaViewFactory::getInstance();
}
/**

View File

@ -1,11 +1,11 @@
<?php
/**
* WikiViewFactory
* PanaceaViewFactory
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
/** Bootstraps the NowhereConcave framework */
@ -14,11 +14,11 @@
/**
* Factory for generating {@link View}s
*
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
* @package Panacea
* @author Tommy Montgomery
* @since 2008-10-05
*/
class WikiViewFactory extends ViewFactory {
class PanaceaViewFactory extends ViewFactory {
protected static $instance = null;
@ -49,7 +49,7 @@
}
//parse out special pages here
$viewName = 'WikiPageView';
$viewName = 'PanaceaPageView';
try {
$refclass = new ReflectionClass($viewName);

View File

@ -1,7 +1,7 @@
<?php
/**
* WikiPageView
* PanaceaPageView
*
* @package Panacea
* @subpackage Views
@ -20,7 +20,7 @@
* @author Tommy Montgomery
* @since 2008-10-05
*/
class WikiPageView extends View {
class PanaceaPageView extends View {
protected $wikiText;