PHPExcel_Worksheet
[ class tree: PHPExcel_Worksheet ] [ index: PHPExcel_Worksheet ] [ all elements ]

Source for file Row.php

Documentation is available at Row.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2009 PHPExcel
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2.1 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the Free Software
  19.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  20.  *
  21.  * @category   PHPExcel
  22.  * @package    PHPExcel_Worksheet
  23.  * @copyright  Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.6.7, 2009-04-22
  26.  */
  27.  
  28.  
  29. /** PHPExcel */
  30. require_once 'PHPExcel.php';
  31.  
  32. /** PHPExcel_Worksheet */
  33. require_once 'PHPExcel/Worksheet.php';
  34.  
  35. /** PHPExcel_Worksheet_CellIterator */
  36. require_once 'PHPExcel/Worksheet/CellIterator.php';
  37.  
  38.  
  39. /**
  40.  * PHPExcel_Worksheet_Row
  41.  * 
  42.  * Represents a row in PHPExcel_Worksheet, used by PHPExcel_Worksheet_RowIterator
  43.  *
  44.  * @category   PHPExcel
  45.  * @package    PHPExcel_Worksheet
  46.  * @copyright  Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
  47.  */
  48. {
  49.     /**
  50.      * PHPExcel_Worksheet
  51.      *
  52.      * @var PHPExcel_Worksheet 
  53.      */
  54.     private $_parent;
  55.     
  56.     /**
  57.      * Row index
  58.      *
  59.      * @var int 
  60.      */
  61.     private $_rowIndex = 0;
  62.     
  63.     /**
  64.      * Create a new row
  65.      *
  66.      * @param PHPExcel_Worksheet         $parent 
  67.      * @param int                        $rowIndex 
  68.      */
  69.     public function __construct(PHPExcel_Worksheet $parent null$rowIndex 1{
  70.         // Set parent and row index
  71.         $this->_parent         = $parent;
  72.         $this->_rowIndex     = $rowIndex;
  73.     }
  74.     
  75.     /**
  76.      * Destructor
  77.      */
  78.     public function __destruct({
  79.         unset($this->_parent);
  80.     }
  81.     
  82.     /**
  83.      * Get row index
  84.      *
  85.      * @return int 
  86.      */
  87.     public function getRowIndex({
  88.         return $this->_rowIndex;
  89.     }
  90.     
  91.     /**
  92.      * Get cell iterator
  93.      *
  94.      * @return PHPExcel_Worksheet_CellIterator 
  95.      */
  96.     public function getCellIterator({
  97.         return new PHPExcel_Worksheet_CellIterator($this->_parent$this->_rowIndex);
  98.     }
  99. }

Documentation generated on Wed, 22 Apr 2009 09:01:50 +0200 by phpDocumentor 1.4.1