[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/spout/src/Spout/Reader/ODS/ -> Sheet.php (source)

   1  <?php
   2  
   3  namespace Box\Spout\Reader\ODS;
   4  
   5  use Box\Spout\Reader\SheetInterface;
   6  use Box\Spout\Reader\Wrapper\XMLReader;
   7  
   8  /**
   9   * Class Sheet
  10   * Represents a sheet within a ODS file
  11   *
  12   * @package Box\Spout\Reader\ODS
  13   */
  14  class Sheet implements SheetInterface
  15  {
  16      /** @var \Box\Spout\Reader\ODS\RowIterator To iterate over sheet's rows */
  17      protected $rowIterator;
  18  
  19      /** @var int ID of the sheet */
  20      protected $id;
  21  
  22      /** @var int Index of the sheet, based on order in the workbook (zero-based) */
  23      protected $index;
  24  
  25      /** @var string Name of the sheet */
  26      protected $name;
  27  
  28      /**
  29       * @param XMLReader $xmlReader XML Reader, positioned on the "<table:table>" element
  30       * @param int $sheetIndex Index of the sheet, based on order in the workbook (zero-based)
  31       * @param string $sheetName Name of the sheet
  32       */
  33      public function __construct($xmlReader, $sheetIndex, $sheetName)
  34      {
  35          $this->rowIterator = new RowIterator($xmlReader);
  36          $this->index = $sheetIndex;
  37          $this->name = $sheetName;
  38      }
  39  
  40      /**
  41       * @api
  42       * @return \Box\Spout\Reader\ODS\RowIterator
  43       */
  44      public function getRowIterator()
  45      {
  46          return $this->rowIterator;
  47      }
  48  
  49      /**
  50       * @api
  51       * @return int Index of the sheet, based on order in the workbook (zero-based)
  52       */
  53      public function getIndex()
  54      {
  55          return $this->index;
  56      }
  57  
  58      /**
  59       * @api
  60       * @return string Name of the sheet
  61       */
  62      public function getName()
  63      {
  64          return $this->name;
  65      }
  66  }


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