ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
RowIterator.php
Go to the documentation of this file.
1 <?php
30 if (!defined('PHPEXCEL_ROOT')) {
34  define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
35 }
36 
38 require_once PHPEXCEL_ROOT . 'PHPExcel.php';
39 
41 require_once PHPEXCEL_ROOT . 'PHPExcel/Worksheet.php';
42 
44 require_once PHPEXCEL_ROOT . 'PHPExcel/Worksheet/Row.php';
45 
46 
57 {
63  private $_subject;
64 
70  private $_position = 0;
71 
77  public function __construct(PHPExcel_Worksheet $subject = null) {
78  // Set subject
79  $this->_subject = $subject;
80  }
81 
85  public function __destruct() {
86  unset($this->_subject);
87  }
88 
92  public function rewind() {
93  $this->_position = 1;
94  }
95 
101  public function current() {
102  return new PHPExcel_Worksheet_Row($this->_subject, $this->_position);
103  }
104 
110  public function key() {
111  return $this->_position;
112  }
113 
117  public function next() {
119  }
120 
126  public function valid() {
127  return $this->_position <= $this->_subject->getHighestRow();
128  }
129 }