<?php
// RankController.php
include_once('core/base/ModuleController.php');
include_once('core/ranks/models/RankModel.php');

/**
 *
 * @author Matthew Lindberg
 */
class RankController extends ModuleController
{
	
	/**
	 * Constructor.
	 *
	 * @param $data_access DataAccess
	 * @param $timer StopWatch
	 * @access public
	 */
	function RankController(& $data_access, & $session, & $timer, & $front_controller)
	{
		global $__CS; 
		$__CS->EnterMethod("RankController ** Constructor");
		$__CS->SendObject($data_access,"DataAccess");
		$__CS->SendObject($timer,"StopWatch");
		
		$model =& new RankModel(& $data_access);
		parent::ModuleController(& $data_access, & $session, & $model, & $timer, & $front_controller);
		
		$__CS->ExitMethod("RankController ** Constructor");
	}
	
	
	
	/**
	 * Processes a request.
	 *
	 * @param $request Request
	 * @access public
	 */
	function processRequest(& $request)
	{
		global $__CS; 
		$__CS->EnterMethod("processRequest:RankController");
		$__CS->SendObject($request,"Request");
		
		$this->request =& $request;
		$this->setRequestContext(& $this->request, & $this);
		
		// Register actions
		include_once('core/base/ActionHandler.php');
		$handler =& new ActionHandler( "core/ranks/actions/",& $this->context);
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		// Handle action
		$show_view = $handler->execute($this->request->get(__ACTION));
		
		if($show_view && ($this->view != NULL)) {
			$this->view->display();
		}
		$__CS->ExitMethod("processRequest:RankController");
	}
}
?>