<?php

/**
 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @package fusionLib
 * @copyright Copyright (c) 2012 - 2013 fusionLib. All rights reserved.
 * @link http://fusionlib.com
 */

/**
 * flControllerAction Class
 *
 * Base class for controller action files.
 *
 * @package fusionLib
 */
abstract class flControllerAction {

	/**
	 * The parent controller.
	 *
	 * @var flController
	 */
	protected $controller;

	/**
	 * The request object.
	 *
	 * @var flRequest
	 */
	protected $request;

	/**
	 * The router object.
	 *
	 * @var flRouter
	 */
	protected $router;

	/**
	 * The response object.
	 *
	 * @var flResponse
	 */
	protected $response;

	/**
	 * Construct the object.
	 *
	 * @param flController $controller The parent controller object.
	 */
	function __construct($controller) {
		$this->controller = $controller;
		$this->request = $controller->getRequest();
		$this->router = $controller->getRouter();
		$this->response = $controller->getResponse();
	}

	/**
	 * Process the action.
	 */
	abstract function process();
}
