public function getView() {
		
		try {
			
			if ($this->view) {
				
				$file = $this->modulePath .'/view'. ucfirst($this->view) .'.php';
				
				if (!file_exists($file)) {
					if ($this->app->currentUser->areKeysPopulated()) {
						throw new \Exception('View file '. $file .' has not been found');
					} else {
						die('Access denied');
					}
				}

				include_once($file);

				$viewName = ucfirst($this->name) .'View'. ucfirst($this->view);
				
				if (!class_exists($viewName)) {
					throw new \Exception('Class ' . $viewName . ' was not found in file ' . $file);
				}
				
				return new $viewName();
				
			} else {
				
				throw new \Exception('No view file has been set');
				
			}
		
		} catch (\Exception $e) {
			
			// set the error in the log
			$this->app->logError($e->getMessage());
			
			// get a fall-back referer or default and redirect the user
			$url = !isset($_SERVER['REFERER']) ? $_SERVER['REFERER'] : BASE_HREF;
			$this->redirect($url, TRUE);
			
		}
		
		return NULL;
		
	}