class PHPExcel_WorksheetIterator in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/WorksheetIterator.php \PHPExcel_WorksheetIterator
PHPExcel_WorksheetIterator
Used to iterate worksheets in PHPExcel
@category PHPExcel @package PHPExcel @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
Hierarchy
- class \PHPExcel_WorksheetIterator implements \Iterator
Expanded class hierarchy of PHPExcel_WorksheetIterator
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ WorksheetIterator.php, line 38
View source
class PHPExcel_WorksheetIterator implements Iterator {
/**
* Spreadsheet to iterate
*
* @var PHPExcel
*/
private $_subject;
/**
* Current iterator position
*
* @var int
*/
private $_position = 0;
/**
* Create a new worksheet iterator
*
* @param PHPExcel $subject
*/
public function __construct(PHPExcel $subject = null) {
// Set subject
$this->_subject = $subject;
}
/**
* Destructor
*/
public function __destruct() {
unset($this->_subject);
}
/**
* Rewind iterator
*/
public function rewind() {
$this->_position = 0;
}
/**
* Current PHPExcel_Worksheet
*
* @return PHPExcel_Worksheet
*/
public function current() {
return $this->_subject
->getSheet($this->_position);
}
/**
* Current key
*
* @return int
*/
public function key() {
return $this->_position;
}
/**
* Next value
*/
public function next() {
++$this->_position;
}
/**
* More PHPExcel_Worksheet instances available?
*
* @return boolean
*/
public function valid() {
return $this->_position < $this->_subject
->getSheetCount();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PHPExcel_WorksheetIterator:: |
private | property | Current iterator position | |
PHPExcel_WorksheetIterator:: |
private | property | Spreadsheet to iterate | |
PHPExcel_WorksheetIterator:: |
public | function | Current PHPExcel_Worksheet | |
PHPExcel_WorksheetIterator:: |
public | function | Current key | |
PHPExcel_WorksheetIterator:: |
public | function | Next value | |
PHPExcel_WorksheetIterator:: |
public | function | Rewind iterator | |
PHPExcel_WorksheetIterator:: |
public | function | More PHPExcel_Worksheet instances available? | |
PHPExcel_WorksheetIterator:: |
public | function | Create a new worksheet iterator | |
PHPExcel_WorksheetIterator:: |
public | function | Destructor |