[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * PHPExcel_Worksheet_Row
   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  class PHPExcel_Worksheet_Row
  29  {
  30      /**
  31       * PHPExcel_Worksheet
  32       *
  33       * @var PHPExcel_Worksheet
  34       */
  35      private $parent;
  36  
  37      /**
  38       * Row index
  39       *
  40       * @var int
  41       */
  42      private $rowIndex = 0;
  43  
  44      /**
  45       * Create a new row
  46       *
  47       * @param PHPExcel_Worksheet         $parent
  48       * @param int                        $rowIndex
  49       */
  50      public function __construct(PHPExcel_Worksheet $parent = null, $rowIndex = 1)
  51      {
  52          // Set parent and row index
  53          $this->parent   = $parent;
  54          $this->rowIndex = $rowIndex;
  55      }
  56  
  57      /**
  58       * Destructor
  59       */
  60      public function __destruct()
  61      {
  62          unset($this->parent);
  63      }
  64  
  65      /**
  66       * Get row index
  67       *
  68       * @return int
  69       */
  70      public function getRowIndex()
  71      {
  72          return $this->rowIndex;
  73      }
  74  
  75      /**
  76       * Get cell iterator
  77       *
  78       * @param    string                $startColumn    The column address at which to start iterating
  79       * @param    string                $endColumn        Optionally, the column address at which to stop iterating
  80       * @return PHPExcel_Worksheet_CellIterator
  81       */
  82      public function getCellIterator($startColumn = 'A', $endColumn = null)
  83      {
  84          return new PHPExcel_Worksheet_RowCellIterator($this->parent, $this->rowIndex, $startColumn, $endColumn);
  85      }
  86  }


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