ICache.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. /**
  3. * PHPExcel_CachedObjectStorage_ICache
  4. *
  5. * Copyright (c) 2006 - 2015 PHPExcel
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * @category PHPExcel
  22. * @package PHPExcel_CachedObjectStorage
  23. * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
  25. * @version ##VERSION##, ##DATE##
  26. */
  27. interface PHPExcel_CachedObjectStorage_ICache
  28. {
  29. /**
  30. * Add or Update a cell in cache identified by coordinate address
  31. *
  32. * @param string $pCoord Coordinate address of the cell to update
  33. * @param PHPExcel_Cell $cell Cell to update
  34. * @return PHPExcel_Cell
  35. * @throws PHPExcel_Exception
  36. */
  37. public function addCacheData($pCoord, PHPExcel_Cell $cell);
  38. /**
  39. * Add or Update a cell in cache
  40. *
  41. * @param PHPExcel_Cell $cell Cell to update
  42. * @return PHPExcel_Cell
  43. * @throws PHPExcel_Exception
  44. */
  45. public function updateCacheData(PHPExcel_Cell $cell);
  46. /**
  47. * Fetch a cell from cache identified by coordinate address
  48. *
  49. * @param string $pCoord Coordinate address of the cell to retrieve
  50. * @return PHPExcel_Cell Cell that was found, or null if not found
  51. * @throws PHPExcel_Exception
  52. */
  53. public function getCacheData($pCoord);
  54. /**
  55. * Delete a cell in cache identified by coordinate address
  56. *
  57. * @param string $pCoord Coordinate address of the cell to delete
  58. * @throws PHPExcel_Exception
  59. */
  60. public function deleteCacheData($pCoord);
  61. /**
  62. * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
  63. *
  64. * @param string $pCoord Coordinate address of the cell to check
  65. * @return boolean
  66. */
  67. public function isDataSet($pCoord);
  68. /**
  69. * Get a list of all cell addresses currently held in cache
  70. *
  71. * @return string[]
  72. */
  73. public function getCellList();
  74. /**
  75. * Get the list of all cell addresses currently held in cache sorted by column and row
  76. *
  77. * @return string[]
  78. */
  79. public function getSortedCellList();
  80. /**
  81. * Clone the cell collection
  82. *
  83. * @param PHPExcel_Worksheet $parent The new worksheet
  84. * @return void
  85. */
  86. public function copyCellCollection(PHPExcel_Worksheet $parent);
  87. /**
  88. * Identify whether the caching method is currently available
  89. * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
  90. *
  91. * @return boolean
  92. */
  93. public static function cacheMethodIsAvailable();
  94. }