ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Iterator.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Worksheet
;
4
5
use
PhpOffice\PhpSpreadsheet\Spreadsheet
;
6
7
class
Iterator
implements
\Iterator
8
{
14
private
$subject
;
15
21
private
$position
= 0;
22
26
public
function
__construct
(
Spreadsheet
$subject
)
27
{
28
// Set subject
29
$this->subject =
$subject
;
30
}
31
35
public
function
rewind
(): void
36
{
37
$this->position = 0;
38
}
39
43
public
function
current
():
Worksheet
44
{
45
return
$this->subject->getSheet($this->position);
46
}
47
51
public
function
key
(): int
52
{
53
return
$this->position
;
54
}
55
59
public
function
next
(): void
60
{
61
++
$this->position
;
62
}
63
69
public
function
valid
()
70
{
71
return
$this->position < $this->subject->getSheetCount() && $this->position >= 0;
72
}
73
}
PhpOffice\PhpSpreadsheet\Worksheet
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\rewind
rewind()
Rewind iterator.
Definition:
Iterator.php:35
PhpOffice\PhpSpreadsheet\Spreadsheet
Definition:
Spreadsheet.php:11
PhpOffice\PhpSpreadsheet\Worksheet\Iterator
Definition:
Iterator.php:7
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\key
key()
Current key.
Definition:
Iterator.php:51
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\$position
$position
Definition:
Iterator.php:21
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\current
current()
Current Worksheet.
Definition:
Iterator.php:43
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\__construct
__construct(Spreadsheet $subject)
Create a new worksheet iterator.
Definition:
Iterator.php:26
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\$subject
$subject
Definition:
Iterator.php:14
Spreadsheet
php
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Definition:
Worksheet.php:28
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\next
next()
Next value.
Definition:
Iterator.php:59
Iterator
PhpOffice\PhpSpreadsheet\Worksheet\Iterator\valid
valid()
Are there more Worksheet instances available?
Definition:
Iterator.php:69
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Worksheet
Iterator.php
Generated on Thu Jan 30 2025 19:01:24 for ILIAS by
1.8.13 (using
Doxyfile
)