class Cells (View source)

Methods

__construct(Worksheet $parent, CacheInterface $cache)

Initialise this new cell collection.

getParent()

Return the parent worksheet for this cell collection.

bool
has(string $pCoord)

Whether the collection holds a cell for the given coordinate.

update(Cell $cell)

Add or update a cell in the collection.

delete(string $pCoord)

Delete a cell in cache identified by coordinate.

string[]
getCoordinates()

Get a list of all cell coordinates currently held in the collection.

string[]
getSortedCoordinates()

Get a sorted list of all cell coordinates currently held in the collection by row and column.

array
getHighestRowAndColumn()

Get highest worksheet column and highest row that have cell records.

string
getCurrentCoordinate()

Return the cell coordinate of the currently active cell object.

string
getCurrentColumn()

Return the column coordinate of the currently active cell object.

int
getCurrentRow()

Return the row coordinate of the currently active cell object.

string
getHighestColumn(string $row = null)

Get highest worksheet column.

int
getHighestRow(string $column = null)

Get highest worksheet row.

cloneCellCollection(Worksheet $parent)

Clone the cell collection.

removeRow(string $row)

Remove a row, deleting all cells in that row.

removeColumn(string $column)

Remove a column, deleting all cells in that column.

add(string $pCoord, Cell $cell)

Add or update a cell identified by its coordinate into the collection.

get(string $pCoord)

Get cell at a specific coordinate.

unsetWorksheetCells()

Clear the cell collection and disconnect from our parent.

__destruct()

Destroy this cell collection.

Details

__construct(Worksheet $parent, CacheInterface $cache)

Initialise this new cell collection.

Parameters

Worksheet $parent The worksheet for this cell collection
CacheInterface $cache

Worksheet getParent()

Return the parent worksheet for this cell collection.

Return Value

Worksheet

bool has(string $pCoord)

Whether the collection holds a cell for the given coordinate.

Parameters

string $pCoord Coordinate of the cell to check

Return Value

bool

Cell update(Cell $cell)

Add or update a cell in the collection.

Parameters

Cell $cell Cell to update

Return Value

Cell

Exceptions

Exception

delete(string $pCoord)

Delete a cell in cache identified by coordinate.

Parameters

string $pCoord Coordinate of the cell to delete

string[] getCoordinates()

Get a list of all cell coordinates currently held in the collection.

Return Value

string[]

string[] getSortedCoordinates()

Get a sorted list of all cell coordinates currently held in the collection by row and column.

Return Value

string[]

array getHighestRowAndColumn()

Get highest worksheet column and highest row that have cell records.

Return Value

array Highest column name and highest row number

string getCurrentCoordinate()

Return the cell coordinate of the currently active cell object.

Return Value

string

string getCurrentColumn()

Return the column coordinate of the currently active cell object.

Return Value

string

int getCurrentRow()

Return the row coordinate of the currently active cell object.

Return Value

int

string getHighestColumn(string $row = null)

Get highest worksheet column.

Parameters

string $row Return the highest column for the specified row, or the highest column of any row if no row number is passed

Return Value

string Highest column name

int getHighestRow(string $column = null)

Get highest worksheet row.

Parameters

string $column Return the highest row for the specified column, or the highest row of any column if no column letter is passed

Return Value

int Highest row number

Cells cloneCellCollection(Worksheet $parent)

Clone the cell collection.

Parameters

Worksheet $parent The new worksheet that we're copying to

Return Value

Cells

removeRow(string $row)

Remove a row, deleting all cells in that row.

Parameters

string $row Row number to remove

removeColumn(string $column)

Remove a column, deleting all cells in that column.

Parameters

string $column Column ID to remove

Cell add(string $pCoord, Cell $cell)

Add or update a cell identified by its coordinate into the collection.

Parameters

string $pCoord Coordinate of the cell to update
Cell $cell Cell to update

Return Value

Cell

Exceptions

Exception

Cell get(string $pCoord)

Get cell at a specific coordinate.

Parameters

string $pCoord Coordinate of the cell

Return Value

Cell Cell that was found, or null if not found

Exceptions

Exception

unsetWorksheetCells()

Clear the cell collection and disconnect from our parent.

__destruct()

Destroy this cell collection.