<?php
/**
 * ###############################################
 *
 * SWIFT Framework
 * _______________________________________________
 *
 * @author		Varun Shoor
 *
 * @package		SWIFT
 * @copyright	Copyright (c) 2001-2012, Kayako
 * @license		http://www.kayako.com/license
 * @link		http://www.kayako.com
 *
 * ###############################################
 */

/**
 * The Help Button Handling Lib
 *
 * @author Varun Shoor
 */
class SWIFT_Help extends SWIFT_Library {
	const DEFAULT_LINK = 'http://anonym.to/?http://www.kayako.com/docs';

	static protected $_linkContainer = array(
		'settings' => '',
		'staffpreferences' => '',
		'usersearch' => '',
		'userorganization' => '',
		'user' => '',
		'notifications' => '',
		'templaterestore' => '',
		'staff' => '',
		'restapi' => '',
		'customfieldgroup' => '',
		'usergroup' => '',
		'language' => '',
		'ratings' => '',
		'moveattachments' => '',
		'templatediagnostics' => '',
		'departments' => '',
		'languagephrase' => '',
		'geoip' => '',
		'templategroup' => '',
		'taggenerator' => '',
		'languageimpex' => '',
		'languagediagnostics' => '',
		'languagerestore' => '',
		'staffgroup' => '',
		'purgeattachments' => '',
		'templateimpex' => '',
		'template' => '',
		'customfield' => '',
		'templatesearch' => '',
		'import' => '',
		'widget' => '',
		'database' => '',
		'diagnostics' => '',
		'app' => '',
		'parserban' => '',
		'parserlooprule' => '',
		'parsercatchall' => '',
		'parserbreakline' => '',
		'parseremailqueue' => '',
		'parserlog' => '',
		'parserrule' => '',
		'reportimpex' => '',
		'newsimpex' => '',
		'newscategory' => '',
		'newssubscriber' => '',
		'newsitem' => '',
		'knowledgebaseview' => '',
		'kbarticle' => '',
		'kbcategory' => '',
		'livechatsearch' => '',
		'chathistory' => '',
		'chatmessage' => '',
		'chatcanned' => '',
		'call' => '',
		'chatskill' => '',
		'chatrule' => '',
		'chatban' => '',
		'chatgroup' => '',
		'messagerouting' => '',
		'ticketview' => '',
		'slaschedule' => '',
		'ticketlink' => '',
		'ticketpriority' => '',
		'slaholidayimpex' => '',
		'escalation' => '',
		'workflow' => '',
		'ticketsmaintenance' => '',
		'ticketfiletype' => '',
		'report' => '',
		'ticketstatus' => '',
		'bayesiandiagnostics' => '',
		'tickettype' => '',
		'slaholiday' => '',
		'bayes' => '',
		'sla' => '',
		'ticketviews' => '',
		'ticketmain' => '',
		'ticketmacro' => '',
		'ticketsearch' => '',
		'troubleshootercategory' => '',
		'troubleshooterstep' => '',
		'autoclose' => '',
	);

	/**
	 * Constructor
	 *
	 * @author Varun Shoor
	 * @return bool "true" on Success, "false" otherwise
	 */
	public function __construct() {
		parent::__construct();

		return true;
	}

	/**
	 * Destructor
	 *
	 * @author Varun Shoor
	 * @return bool "true" on Success, "false" otherwise
	 */
	public function __destruct() {
		parent::__destruct();

		return true;
	}

	/**
	 * Retrieve the Help Link
	 *
	 * @author Varun Shoor
	 * @param string $_linkName The Link Name
	 * @return string The Documentation Link
	 * @throws SWIFT_Exception If Invalid Data is Provided
	 */
	static public function RetrieveHelpLink($_linkName) {
		if (empty($_linkName)) {
			throw new SWIFT_Exception(SWIFT_INVALIDDATA);
		}

		if (isset(self::$_linkContainer[$_linkName]) && !empty(self::$_linkContainer[$_linkName])) {
			return self::$_linkContainer[$_linkName];
		}

		return self::DEFAULT_LINK;
	}
}
?>