class PHPExcel_CachedObjectStorage_Memory extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache

PHPExcelCachedObjectStorageMemory

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Methods

__construct(PHPExcel_Worksheet $parent)

Initialise this new cell collection

getParent()

Return the parent worksheet for this cell collection

boolean
isDataSet(string $pCoord)

Is a value set in the current PHPExcelCachedObjectStorageICache for an indexed cell?

boolean
moveCell(string $fromAddress, string $toAddress)

Move a cell object from one address to another

deleteCacheData(string $pCoord)

Delete a cell in cache identified by coordinate address

string[]
getCellList()

Get a list of all cell addresses currently held in cache

string[]
getSortedCellList()

Sort the list of all cell addresses currently held in cache by row and column

array
getHighestRowAndColumn()

Get highest worksheet column and highest row that have cell records

string
getCurrentAddress()

Return the cell address of the currently active cell object

string
getCurrentColumn()

Return the column address of the currently active cell object

integer
getCurrentRow()

Return the row address of the currently active cell object

string
getHighestColumn(string $row = null)

Get highest worksheet column

int
getHighestRow(string $column = null)

Get highest worksheet row

void
copyCellCollection(PHPExcel_Worksheet $parent)

Clone the cell collection

void
removeRow(string $row)

Remove a row, deleting all cells in that row

void
removeColumn(string $column)

Remove a column, deleting all cells in that column

static boolean
cacheMethodIsAvailable()

Identify whether the caching method is currently available Some methods are dependent on the availability of certain extensions being enabled in the PHP build

addCacheData(string $pCoord, PHPExcel_Cell $cell)

Add or Update a cell in cache identified by coordinate address

getCacheData(string $pCoord)

Get cell at a specific coordinate

unsetWorksheetCells()

Clear the cell collection and disconnect from our parent

Details

__construct(PHPExcel_Worksheet $parent)

Initialise this new cell collection

Parameters

PHPExcel_Worksheet $parent The worksheet for this cell collection

PHPExcel_Worksheet getParent()

Return the parent worksheet for this cell collection

Return Value

PHPExcel_Worksheet

boolean isDataSet(string $pCoord)

Is a value set in the current PHPExcelCachedObjectStorageICache for an indexed cell?

Parameters

string $pCoord Coordinate address of the cell to check

Return Value

boolean

boolean moveCell(string $fromAddress, string $toAddress)

Move a cell object from one address to another

Parameters

string $fromAddress Current address of the cell to move
string $toAddress Destination address of the cell to move

Return Value

boolean

PHPExcel_Cell updateCacheData(PHPExcel_Cell $cell)

Add or Update a cell in cache

Parameters

PHPExcel_Cell $cell Cell to update

Return Value

PHPExcel_Cell

Exceptions

PHPExcel_Exception

deleteCacheData(string $pCoord)

Delete a cell in cache identified by coordinate address

Parameters

string $pCoord Coordinate address of the cell to delete

Exceptions

PHPExcel_Exception

string[] getCellList()

Get a list of all cell addresses currently held in cache

Return Value

string[]

string[] getSortedCellList()

Sort the list of all cell addresses currently held in cache 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 getCurrentAddress()

Return the cell address of the currently active cell object

Return Value

string

string getCurrentColumn()

Return the column address of the currently active cell object

Return Value

string

integer getCurrentRow()

Return the row address of the currently active cell object

Return Value

integer

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

at line 96
void copyCellCollection(PHPExcel_Worksheet $parent)

Clone the cell collection

Parameters

PHPExcel_Worksheet $parent The new worksheet

Return Value

void

void removeRow(string $row)

Remove a row, deleting all cells in that row

Parameters

string $row Row number to remove

Return Value

void

void removeColumn(string $column)

Remove a column, deleting all cells in that column

Parameters

string $column Column ID to remove

Return Value

void

static boolean cacheMethodIsAvailable()

Identify whether the caching method is currently available Some methods are dependent on the availability of certain extensions being enabled in the PHP build

Return Value

boolean

at line 56
PHPExcel_Cell addCacheData(string $pCoord, PHPExcel_Cell $cell)

Add or Update a cell in cache identified by coordinate address

Parameters

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

Return Value

PHPExcel_Cell

Exceptions

PHPExcel_Exception

at line 74
PHPExcel_Cell getCacheData(string $pCoord)

Get cell at a specific coordinate

Parameters

string $pCoord Coordinate address of the cell to retrieve

Return Value

PHPExcel_Cell Cell that was found, or null if not found

Exceptions

PHPExcel_Exception

at line 113
unsetWorksheetCells()

Clear the cell collection and disconnect from our parent