• 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 
00035 class ilPaymentExcelWriterAdapter
00036 {
00037         var $workbook = null;
00038 
00039         var $format_bold = null;
00040         var $format_header = null;
00041 
00042         function ilPaymentExcelWriterAdapter($a_filename,$a_send = true)
00043         {
00044                 $result = @include_once 'Spreadsheet/Excel/Writer.php';
00045                 if (!$result)
00046                 {
00047                         include_once './classes/Spreadsheet/Excel/Writer.php';
00048                 }
00049                 if($a_send)
00050                 {
00051                         $this->workbook =& new Spreadsheet_Excel_Writer();
00052                         $this->workbook->send($a_filename);
00053                 }
00054                 else
00055                 {
00056                         $this->workbook =& new Spreadsheet_Excel_Writer($a_filename);
00057                 }
00058                 $this->__initFormatBold();
00059                 $this->__initFormatHeader();
00060                 $this->__initFormatTitle();
00061         }
00062 
00063         function &getWorkbook()
00064         {
00065                 return $this->workbook;
00066         }
00067 
00068         function &getFormatBold()
00069         {
00070                 return $this->format_bold;
00071         }
00072         function &getFormatHeader()
00073         {
00074                 return $this->format_header;
00075         }
00076         function &getFormatTitle()
00077         {
00078                 return $this->format_title;
00079         }
00080         function &getFormatDate()
00081         {
00082                 return $this->format_date;
00083         }
00084 
00085         // PRIVATE
00086         function __initFormatBold()
00087         {
00088                 $this->format_bold =& $this->workbook->addFormat();
00089                 $this->format_bold->setBold();
00090         }
00091         function __initFormatHeader()
00092         {
00093                 $this->format_header =& $this->workbook->addFormat();
00094                 $this->format_header->setBold();
00095                 $this->format_header->setTop(100);
00096                 $this->format_header->setColor('black');
00097                 $this->format_header->setPattern(1);
00098                 $this->format_header->setFgColor('silver');
00099         }
00100         function __initFormatTitle()
00101         {
00102                 $this->format_title =& $this->workbook->addFormat();
00103                 $this->format_title->setBold();
00104                 $this->format_title->setColor('black');
00105                 $this->format_title->setPattern(1);
00106                 $this->format_title->setSize(16);
00107                 $this->format_title->setAlign('center');
00108         }
00109         function __initFormatDate()
00110         {
00111                 $this->format_date =& $this->workbook->addFormat();
00112                 $this->format_date->setNumFormat("YYYY-MM-DD hh:mm:ss");
00113         }
00114 
00115 
00116 }
00117 ?>

Generated on Fri Dec 13 2013 09:06:37 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1