Go to the documentation of this file.00001 <?php
00002
00006 class GenExport_Do extends DynExportBase
00007 {
00013 public $sClassDo = "genExport_do";
00014
00020 public $sClassMain = "genExport_main";
00021
00027 public $sExportFileName = "genexport";
00028
00033 protected $_sThisTemplate = "dynbase_do.tpl";
00034
00042 public function nextTick( $iCnt )
00043 {
00044 $iExportedItems = $iCnt;
00045 $blContinue = false;
00046 if ( $oArticle = $this->getOneArticle( $iCnt, $blContinue ) ) {
00047 $myConfig = oxConfig::getInstance();
00048 $oSmarty = oxUtilsView::getInstance()->getSmarty();
00049 $oSmarty->assign_by_ref( "linenr", $iCnt );
00050 $oSmarty->assign_by_ref( "article", $oArticle );
00051 $oSmarty->assign( "spr", $myConfig->getConfigParam( 'sCSVSign' ) );
00052 $oSmarty->assign( "encl", $myConfig->getConfigParam( 'sGiCsvFieldEncloser' ) );
00053 $this->write( $oSmarty->fetch( "genexport.tpl", $this->getViewId() ) );
00054 return ++$iExportedItems;
00055 }
00056
00057 return $blContinue;
00058 }
00059
00067 public function write( $sLine )
00068 {
00069 $sLine = $this->removeSID( $sLine );
00070
00071 $sLine = str_replace( array("\r\n","\n"), "", $sLine );
00072 $sLine = str_replace( "<br>", "\n", $sLine );
00073
00074 fwrite( $this->fpFile, $sLine."\r\n");
00075 }
00076
00077 }