[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/phpexcel/PHPExcel/Worksheet/ -> CellIterator.php (source)

   1  <?php
   2  
   3  /**
   4   * PHPExcel_Worksheet_CellIterator
   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_Worksheet
  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_Worksheet_CellIterator
  29  {
  30      /**
  31       * PHPExcel_Worksheet to iterate
  32       *
  33       * @var PHPExcel_Worksheet
  34       */
  35      protected $subject;
  36  
  37      /**
  38       * Current iterator position
  39       *
  40       * @var mixed
  41       */
  42      protected $position = null;
  43  
  44      /**
  45       * Iterate only existing cells
  46       *
  47       * @var boolean
  48       */
  49      protected $onlyExistingCells = false;
  50  
  51      /**
  52       * Destructor
  53       */
  54      public function __destruct()
  55      {
  56          unset($this->subject);
  57      }
  58  
  59      /**
  60       * Get loop only existing cells
  61       *
  62       * @return boolean
  63       */
  64      public function getIterateOnlyExistingCells()
  65      {
  66          return $this->onlyExistingCells;
  67      }
  68  
  69      /**
  70       * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary
  71       *
  72       * @throws PHPExcel_Exception
  73       */
  74      abstract protected function adjustForExistingOnlyRange();
  75  
  76      /**
  77       * Set the iterator to loop only existing cells
  78       *
  79       * @param    boolean        $value
  80       * @throws PHPExcel_Exception
  81       */
  82      public function setIterateOnlyExistingCells($value = true)
  83      {
  84          $this->onlyExistingCells = (boolean) $value;
  85  
  86          $this->adjustForExistingOnlyRange();
  87      }
  88  }


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