/**
  * Initialisation of the ImageGraph object. Checks if the file is already generated,
  * otherwise generation of the file is not necessary.
  *
  * @param	array		TS Configuration of the image
  * @param tx_rnbase_plot_IDataProvider $dp
  * @return	string		The img tag
  */
 public function make($arrConf, $dp)
 {
     $this->setDataProvider($dp);
     if ($arrConf) {
         $strFileName = $this->getFileName('ImageGraph/', $arrConf, $arrConf['factory']);
         $arrConf['factory'] = $arrConf['factory'] ? $arrConf['factory'] : 'png';
         $arrConf['width'] = $arrConf['width'] ? $arrConf['width'] : '400';
         $arrConf['height'] = $arrConf['height'] ? $arrConf['height'] : '300';
         if (!@file_exists(PATH_site . $strFileName) || TRUE) {
             // TODO: remove me!!!
             $objGraph = $this->makeCanvas($arrConf, $dp);
             $objGraph->done(array('filename' => PATH_site . $strFileName));
         }
         $strAltParam = $this->getAltParam($arrConf);
         switch (strtolower($arrConf['factory'])) {
             case 'svg':
                 $strOutput = '<object width="' . $arrConf['width'] . '" height="' . $arrConf['height'] . '" type="image/svg+xml" data="' . $strFileName . '">Browser does not support SVG files!</object>';
                 break;
             case 'pdf':
                 header('Location: ' . tx_rnbase_util_Network::locationHeaderUrl($strFileName));
                 exit;
             default:
                 $strOutput = '<img width="' . $arrConf['width'] . '" height="' . $arrConf['height'] . '" src="/' . $strFileName . '" ' . $strAltParam . ' />';
         }
     }
     return $strOutput;
 }
 /**
  * @group unit
  */
 public function testLocationHeaderUrl()
 {
     self::assertEquals('http://www.google.de/url.html', tx_rnbase_util_Network::locationHeaderUrl('http://www.google.de/url.html'));
 }
 /**
  * Redirect the page to the url
  *
  * @return	void
  */
 function redirect()
 {
     session_write_close();
     $target = $this->makeUrl(FALSE);
     $target = tx_rnbase_util_Network::locationHeaderUrl($target);
     header('Location: ' . $target);
     exit;
 }