<?php
/**
 * @copyright  2009-2011 Roberto Perpuly
 *
 * This source may not be redistributed without prior consent.  Access to the 
 * source does not imply that you have consent to redistribute either this source
 * code or the generated binary. See LICENSE file for details.
 */

/**
 * This is a class that represents a URL tag. Triumph will use these URL
 * objects to open files, run web pages, and inspect controllers and view files.
 */
class Triumph_UrlTag {

	/**
	 * These are relative URLs; they are relative to the server root and may contain a query string.
	 * For example, if a user would type in "http://localhost.codeigniter/index.php/news/index" the
	 * this URL should contain "index.php/news/index"
	 *
	 * @var string
	 */
	public $url;
	
	/**
	 * The file where the source code of the URL is located in.  This is the entry point
	 * to the URL; for a framework $fileName will be the location of the controller.
	 * fileName is full path (os-dependant).
	 * @var string
	 */
	public $fileName;
	
	/**
	 * The name of the controller class that handles this URL.  If a project does not
	 * use a framework, this will be empty.
	 *
	 * @var string
	 */
	public $className;
	
	/**
	 * The name of the controller method that handles this URL.  If a project does not
	 * use a framework, this will be empty.
	 *
	 * @var string
	 */
	public $methodName;
	

	public function __construct($url, $fileName, $className, $methodName) {
		$this->url = $url;
		$this->fileName = $fileName;
		$this->className = $className;
		$this->methodName = $methodName;
	}
}