• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

payment/classes/class.ilPaymentExcelWriterAdapter.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00036 class ilPaymentExcelWriterAdapter
00037 {
00038         var $workbook = null;
00039 
00040         var $format_bold = null;
00041         var $format_header = null;
00042 
00043         function ilPaymentExcelWriterAdapter($a_filename,$a_send = true)
00044         {
00045                 $result = @include_once 'Spreadsheet/Excel/Writer.php';
00046                 if (!$result)
00047                 {
00048                         include_once './classes/Spreadsheet/Excel/Writer.php';
00049                 }
00050                 if($a_send)
00051                 {
00052                         $this->workbook =& new Spreadsheet_Excel_Writer();
00053                         $this->workbook->send($a_filename);
00054                 }
00055                 else
00056                 {
00057                         $this->workbook =& new Spreadsheet_Excel_Writer($a_filename);
00058                 }
00059                 $this->__initFormatBold();
00060                 $this->__initFormatHeader();
00061                 $this->__initFormatTitle();
00062         }
00063 
00064         function &getWorkbook()
00065         {
00066                 return $this->workbook;
00067         }
00068 
00069         function &getFormatBold()
00070         {
00071                 return $this->format_bold;
00072         }
00073         function &getFormatHeader()
00074         {
00075                 return $this->format_header;
00076         }
00077         function &getFormatTitle()
00078         {
00079                 return $this->format_title;
00080         }
00081         function &getFormatDate()
00082         {
00083                 return $this->format_date;
00084         }
00085 
00086         // PRIVATE
00087         function __initFormatBold()
00088         {
00089                 $this->format_bold =& $this->workbook->addFormat();
00090                 $this->format_bold->setBold();
00091         }
00092         function __initFormatHeader()
00093         {
00094                 $this->format_header =& $this->workbook->addFormat();
00095                 $this->format_header->setBold();
00096                 $this->format_header->setTop(100);
00097                 $this->format_header->setColor('black');
00098                 $this->format_header->setPattern(1);
00099                 $this->format_header->setFgColor('silver');
00100         }
00101         function __initFormatTitle()
00102         {
00103                 $this->format_title =& $this->workbook->addFormat();
00104                 $this->format_title->setBold();
00105                 $this->format_title->setColor('black');
00106                 $this->format_title->setPattern(1);
00107                 $this->format_title->setSize(16);
00108                 $this->format_title->setAlign('center');
00109         }
00110         function __initFormatDate()
00111         {
00112                 $this->format_date =& $this->workbook->addFormat();
00113                 $this->format_date->setNumFormat("YYYY-MM-DD hh:mm:ss");
00114         }
00115 
00116 
00117 }
00118 ?>

Generated on Fri Dec 13 2013 11:57:58 for ILIAS Release_3_6_x_branch .rev 46809 by  doxygen 1.7.1