updating code to conform to the naming scheme
This commit is contained in:
		
							parent
							
								
									e0bec3a5c8
								
							
						
					
					
						commit
						4222880c0d
					
				| @ -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; | ||||
| 		} | ||||
| 		 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <?php | ||||
| 
 | ||||
| 	/** | ||||
| 	 * WikiControllerFactory | ||||
| 	 * PanaceaControllerFactory | ||||
| 	 * | ||||
| 	 * @package Panacea | ||||
| 	 * @author  Tommy Montgomery | ||||
| @ -18,12 +18,12 @@ | ||||
| 	 * @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]); | ||||
| 		} | ||||
| 		 | ||||
| 	} | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <?php | ||||
| 
 | ||||
| 	/** | ||||
| 	 * WikiPageController | ||||
| 	 * PanaceaPageController | ||||
| 	 * | ||||
| 	 * @package Panacea | ||||
| 	 * @author  Tommy Montgomery | ||||
| @ -12,20 +12,20 @@ | ||||
| 	require_once 'NowhereConcave/bootstrap.php'; | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Wiki page controller | ||||
| 	 * Panacea page controller | ||||
| 	 * | ||||
| 	 * @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(); | ||||
| 		} | ||||
| 		 | ||||
| 		/** | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <?php | ||||
| 
 | ||||
| 	/** | ||||
| 	 * WikiViewFactory | ||||
| 	 * PanaceaViewFactory | ||||
| 	 * | ||||
| 	 * @package Panacea | ||||
| 	 * @author  Tommy Montgomery | ||||
| @ -18,7 +18,7 @@ | ||||
| 	 * @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); | ||||
|  | ||||
| @ -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; | ||||
| 		 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user