Documentation

ColumnIterator
in package
implements Iterator

Tags
implements

NativeIterator<string, Column>

Table of Contents

Interfaces

Iterator

Properties

$currentColumnIndex  : int
Current iterator position.
$endColumnIndex  : int
End position.
$startColumnIndex  : int
Start position.
$worksheet  : Worksheet
Worksheet to iterate.

Methods

__construct()  : mixed
Create a new column iterator.
__destruct()  : mixed
Destructor.
current()  : Column
Return the current column in this worksheet.
key()  : string
Return the current iterator key.
next()  : void
Set the iterator to its next value.
prev()  : void
Set the iterator to its previous value.
resetEnd()  : $this
(Re)Set the end column.
resetStart()  : $this
(Re)Set the start column and the current column pointer.
rewind()  : void
Rewind the iterator to the starting column.
seek()  : $this
Set the column pointer to the selected column.
valid()  : bool
Indicate if more columns exist in the worksheet range of columns that we're iterating.

Properties

$currentColumnIndex

Current iterator position.

private int $currentColumnIndex = 1

$startColumnIndex

Start position.

private int $startColumnIndex = 1

Methods

__construct()

Create a new column iterator.

public __construct(Worksheet $worksheet[, string $startColumn = 'A' ][, string|null $endColumn = null ]) : mixed
Parameters
$worksheet : Worksheet

The worksheet to iterate over

$startColumn : string = 'A'

The column address at which to start iterating

$endColumn : string|null = null

Optionally, the column address at which to stop iterating

key()

Return the current iterator key.

public key() : string
Return values
string

next()

Set the iterator to its next value.

public next() : void

prev()

Set the iterator to its previous value.

public prev() : void

resetEnd()

(Re)Set the end column.

public resetEnd([string|null $endColumn = null ]) : $this
Parameters
$endColumn : string|null = null

The column address at which to stop iterating

Return values
$this

resetStart()

(Re)Set the start column and the current column pointer.

public resetStart([string $startColumn = 'A' ]) : $this
Parameters
$startColumn : string = 'A'

The column address at which to start iterating

Return values
$this

rewind()

Rewind the iterator to the starting column.

public rewind() : void

seek()

Set the column pointer to the selected column.

public seek([string $column = 'A' ]) : $this
Parameters
$column : string = 'A'

The column address to set the current pointer at

Return values
$this

valid()

Indicate if more columns exist in the worksheet range of columns that we're iterating.

public valid() : bool
Return values
bool

        
On this page

Search results