Documentation

CellIterator
in package
implements Iterator

AbstractYes
Tags
template

TKey

implements

NativeIterator<TKey, Cell>

Table of Contents

Interfaces

Iterator

Constants

IF_NOT_EXISTS_CREATE_NEW  = true
IF_NOT_EXISTS_RETURN_NULL  = false
TREAT_EMPTY_STRING_AS_EMPTY_CELL  = 2
TREAT_NULL_VALUE_AS_EMPTY_CELL  = 1

Properties

$cellCollection  : Cells
Cell Collection to iterate.
$ifNotExists  : bool
If iterating all cells, and a cell doesn't exist, identifies whether a new cell should be created, or if the iterator should return a null value.
$onlyExistingCells  : bool
Iterate only existing cells.
$worksheet  : Worksheet
Worksheet to iterate.

Methods

__destruct()  : mixed
Destructor.
getIfNotExists()  : bool
getIterateOnlyExistingCells()  : bool
Get loop only existing cells.
setIfNotExists()  : void
setIterateOnlyExistingCells()  : void
Set the iterator to loop only existing cells.
adjustForExistingOnlyRange()  : void
Validate start/end values for 'IterateOnlyExistingCells' mode, and adjust if necessary.

Constants

IF_NOT_EXISTS_CREATE_NEW

public mixed IF_NOT_EXISTS_CREATE_NEW = true

IF_NOT_EXISTS_RETURN_NULL

public mixed IF_NOT_EXISTS_RETURN_NULL = false

TREAT_EMPTY_STRING_AS_EMPTY_CELL

public mixed TREAT_EMPTY_STRING_AS_EMPTY_CELL = 2

TREAT_NULL_VALUE_AS_EMPTY_CELL

public mixed TREAT_NULL_VALUE_AS_EMPTY_CELL = 1

Properties

$ifNotExists

If iterating all cells, and a cell doesn't exist, identifies whether a new cell should be created, or if the iterator should return a null value.

protected bool $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW

$onlyExistingCells

Iterate only existing cells.

protected bool $onlyExistingCells = false

Methods

getIfNotExists()

public getIfNotExists() : bool
Return values
bool

getIterateOnlyExistingCells()

Get loop only existing cells.

public getIterateOnlyExistingCells() : bool
Return values
bool

setIfNotExists()

public setIfNotExists([bool $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW ]) : void
Parameters
$ifNotExists : bool = self::IF_NOT_EXISTS_CREATE_NEW

setIterateOnlyExistingCells()

Set the iterator to loop only existing cells.

public setIterateOnlyExistingCells(bool $value) : void
Parameters
$value : bool

adjustForExistingOnlyRange()

Validate start/end values for 'IterateOnlyExistingCells' mode, and adjust if necessary.

protected abstract adjustForExistingOnlyRange() : void

        
On this page

Search results