[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/phpexcel/PHPExcel/Writer/Excel2007/ -> WriterPart.php (source)

   1  <?php
   2  
   3  /**
   4   * PHPExcel_Writer_Excel2007_WriterPart
   5   *
   6   * Copyright (c) 2006 - 2015 PHPExcel
   7   *
   8   * This library is free software; you can redistribute it and/or
   9   * modify it under the terms of the GNU Lesser General Public
  10   * License as published by the Free Software Foundation; either
  11   * version 2.1 of the License, or (at your option) any later version.
  12   *
  13   * This library is distributed in the hope that it will be useful,
  14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16   * Lesser General Public License for more details.
  17   *
  18   * You should have received a copy of the GNU Lesser General Public
  19   * License along with this library; if not, write to the Free Software
  20   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  21   *
  22   * @category   PHPExcel
  23   * @package    PHPExcel_Writer_Excel2007
  24   * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  25   * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  26   * @version    ##VERSION##, ##DATE##
  27   */
  28  abstract class PHPExcel_Writer_Excel2007_WriterPart
  29  {
  30      /**
  31       * Parent IWriter object
  32       *
  33       * @var PHPExcel_Writer_IWriter
  34       */
  35      private $parentWriter;
  36  
  37      /**
  38       * Set parent IWriter object
  39       *
  40       * @param PHPExcel_Writer_IWriter    $pWriter
  41       * @throws PHPExcel_Writer_Exception
  42       */
  43      public function setParentWriter(PHPExcel_Writer_IWriter $pWriter = null)
  44      {
  45          $this->parentWriter = $pWriter;
  46      }
  47  
  48      /**
  49       * Get parent IWriter object
  50       *
  51       * @return PHPExcel_Writer_IWriter
  52       * @throws PHPExcel_Writer_Exception
  53       */
  54      public function getParentWriter()
  55      {
  56          if (!is_null($this->parentWriter)) {
  57              return $this->parentWriter;
  58          } else {
  59              throw new PHPExcel_Writer_Exception("No parent PHPExcel_Writer_IWriter assigned.");
  60          }
  61      }
  62  
  63      /**
  64       * Set parent IWriter object
  65       *
  66       * @param PHPExcel_Writer_IWriter    $pWriter
  67       * @throws PHPExcel_Writer_Exception
  68       */
  69      public function __construct(PHPExcel_Writer_IWriter $pWriter = null)
  70      {
  71          if (!is_null($pWriter)) {
  72              $this->parentWriter = $pWriter;
  73          }
  74      }
  75  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1