ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_WorksheetIterator Class Reference
+ Inheritance diagram for PHPExcel_WorksheetIterator:
+ Collaboration diagram for PHPExcel_WorksheetIterator:

Public Member Functions

 __construct (PHPExcel $subject=null)
 Create a new worksheet iterator. More...
 
 __destruct ()
 Destructor. More...
 
 rewind ()
 Rewind iterator. More...
 
 current ()
 Current PHPExcel_Worksheet. More...
 
 key ()
 Current key. More...
 
 next ()
 Next value. More...
 
 valid ()
 More PHPExcel_Worksheet instances available? More...
 

Private Attributes

 $_subject
 
 $_position = 0
 

Detailed Description

Definition at line 38 of file WorksheetIterator.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_WorksheetIterator::__construct ( PHPExcel  $subject = null)

Create a new worksheet iterator.

Parameters
PHPExcel$subject

Definition at line 59 of file WorksheetIterator.php.

60  {
61  // Set subject
62  $this->_subject = $subject;
63  }

◆ __destruct()

PHPExcel_WorksheetIterator::__destruct ( )

Destructor.

Definition at line 68 of file WorksheetIterator.php.

69  {
70  unset($this->_subject);
71  }

Member Function Documentation

◆ current()

PHPExcel_WorksheetIterator::current ( )

Current PHPExcel_Worksheet.

Returns
PHPExcel_Worksheet

Definition at line 86 of file WorksheetIterator.php.

87  {
88  return $this->_subject->getSheet($this->_position);
89  }

◆ key()

PHPExcel_WorksheetIterator::key ( )

Current key.

Returns
int

Definition at line 96 of file WorksheetIterator.php.

References $_position.

◆ next()

PHPExcel_WorksheetIterator::next ( )

Next value.

Definition at line 104 of file WorksheetIterator.php.

References $_position.

◆ rewind()

PHPExcel_WorksheetIterator::rewind ( )

Rewind iterator.

Definition at line 76 of file WorksheetIterator.php.

77  {
78  $this->_position = 0;
79  }

◆ valid()

PHPExcel_WorksheetIterator::valid ( )

More PHPExcel_Worksheet instances available?

Returns
boolean

Definition at line 114 of file WorksheetIterator.php.

115  {
116  return $this->_position < $this->_subject->getSheetCount();
117  }

Field Documentation

◆ $_position

PHPExcel_WorksheetIterator::$_position = 0
private

Definition at line 52 of file WorksheetIterator.php.

Referenced by key(), and next().

◆ $_subject

PHPExcel_WorksheetIterator::$_subject
private

Definition at line 45 of file WorksheetIterator.php.


The documentation for this class was generated from the following file: