*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* Name of the link
*/
- private $linkName = "";
+ private $linkName = '';
/**
* Base of the link
*/
- private $linkBase = "";
+ private $linkBase = '';
+
+ /**
+ * First parameter seperator
+ */
+ private $firstParameter = '?';
+
+ /**
+ * Seperator for more paraemters
+ */
+ private $parameterSeperator = '&';
/**
* Protected constructor
$helperInstance->setLinkBase($linkBase);
// Add default group
- $helperInstance->openGroupByIdContent('main', "", "");
+ $helperInstance->openGroupByIdContent('main', '', '');
// Return the prepared instance
return $helperInstance;
* @param $extraContent Optional extra HTML content
* @return $linkContent Rendered text link content
*/
- private function renderLinkContentWithTextExtraContent ($linkText, $linkTitle, $extraContent="") {
+ private function renderLinkContentWithTextExtraContent ($linkText, $linkTitle, $extraContent='') {
// Construct link content
$linkContent = sprintf("<a href=\"%s%s\" title=\"%s\">%s</a>",
$this->getLinkBase(),
// Is a previous opened group still open?
if ($this->ifGroupOpenedPreviously()) {
// Then close it
- $this->closePreviousGroupByContent("");
+ $this->closePreviousGroupByContent('');
} // END - if
// Get the content
// Is a group with that name open?
if ($this->ifGroupOpenedPreviously()) {
// Then close it here
- $this->closePreviousGroupByContent("");
+ $this->closePreviousGroupByContent('');
} // END - if
// Generate the group content
// Check if a previous group was opened
if ($this->ifGroupOpenedPreviously() === false) {
// No group was opened before!
- throw new NoGroupOpenedException(array($this, $linkAction."(".$linkText.")"), self::EXCEPTION_GROUP_NOT_OPENED);
+ throw new NoGroupOpenedException(array($this, $linkAction . '(' . $linkText . ')'), self::EXCEPTION_GROUP_NOT_OPENED);
} // END - if
// Default parameter seperator is &
- $seperator = "&";
+ $seperator = $this->parameterSeperator;
// Is there a question mark in?
- $linkArray = explode("?", $this->getLinkBase());
+ $linkArray = explode($this->firstParameter, $this->getLinkBase());
if (count($linkArray) == 0) {
// No question mark
- $seperator = "?";
+ $seperator = $this->firstParameter;
} // END - if
// Prepare action