Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • CholeskyDecomposition
  • Dao
  • DateTime
  • DateTimeZone
  • DOMNode
  • EigenvalueDecomposition
  • Elemento
  • Historial
  • Irradiacion
  • Latitud
  • MotorPhp
  • Panel
  • PclZip
  • Periodo
  • PHPExcel
  • PHPExcel_Autoloader
  • PHPExcel_Best_Fit
  • PHPExcel_CachedObjectStorage_APC
  • PHPExcel_CachedObjectStorage_CacheBase
  • PHPExcel_CachedObjectStorage_DiscISAM
  • PHPExcel_CachedObjectStorage_Igbinary
  • PHPExcel_CachedObjectStorage_Memcache
  • PHPExcel_CachedObjectStorage_Memory
  • PHPExcel_CachedObjectStorage_MemoryGZip
  • PHPExcel_CachedObjectStorage_MemorySerialized
  • PHPExcel_CachedObjectStorage_PHPTemp
  • PHPExcel_CachedObjectStorage_SQLite
  • PHPExcel_CachedObjectStorage_SQLite3
  • PHPExcel_CachedObjectStorage_Wincache
  • PHPExcel_CachedObjectStorageFactory
  • PHPExcel_CalcEngine_CyclicReferenceStack
  • PHPExcel_CalcEngine_Logger
  • PHPExcel_Calculation
  • PHPExcel_Calculation_Database
  • PHPExcel_Calculation_DateTime
  • PHPExcel_Calculation_Engineering
  • PHPExcel_Calculation_ExceptionHandler
  • PHPExcel_Calculation_Financial
  • PHPExcel_Calculation_FormulaParser
  • PHPExcel_Calculation_FormulaToken
  • PHPExcel_Calculation_Function
  • PHPExcel_Calculation_Functions
  • PHPExcel_Calculation_Logical
  • PHPExcel_Calculation_LookupRef
  • PHPExcel_Calculation_MathTrig
  • PHPExcel_Calculation_Statistical
  • PHPExcel_Calculation_TextData
  • PHPExcel_Calculation_Token_Stack
  • PHPExcel_Cell
  • PHPExcel_Cell_AdvancedValueBinder
  • PHPExcel_Cell_DataType
  • PHPExcel_Cell_DataValidation
  • PHPExcel_Cell_DefaultValueBinder
  • PHPExcel_Cell_Hyperlink
  • PHPExcel_Chart
  • PHPExcel_Chart_DataSeries
  • PHPExcel_Chart_DataSeriesValues
  • PHPExcel_Chart_Layout
  • PHPExcel_Chart_Legend
  • PHPExcel_Chart_PlotArea
  • PHPExcel_Chart_Renderer_jpgraph
  • PHPExcel_Chart_Title
  • PHPExcel_Comment
  • PHPExcel_DocumentProperties
  • PHPExcel_DocumentSecurity
  • PHPExcel_Exponential_Best_Fit
  • PHPExcel_HashTable
  • PHPExcel_IOFactory
  • PHPExcel_Linear_Best_Fit
  • PHPExcel_Logarithmic_Best_Fit
  • PHPExcel_NamedRange
  • PHPExcel_Polynomial_Best_Fit
  • PHPExcel_Power_Best_Fit
  • PHPExcel_Reader_Abstract
  • PHPExcel_Reader_CSV
  • PHPExcel_Reader_DefaultReadFilter
  • PHPExcel_Reader_Excel2003XML
  • PHPExcel_Reader_Excel2007
  • PHPExcel_Reader_Excel2007_Chart
  • PHPExcel_Reader_Excel2007_Theme
  • PHPExcel_Reader_Excel5
  • PHPExcel_Reader_Excel5_Escher
  • PHPExcel_Reader_Excel5_MD5
  • PHPExcel_Reader_Excel5_RC4
  • PHPExcel_Reader_Gnumeric
  • PHPExcel_Reader_HTML
  • PHPExcel_Reader_OOCalc
  • PHPExcel_Reader_SYLK
  • PHPExcel_ReferenceHelper
  • PHPExcel_RichText
  • PHPExcel_RichText_Run
  • PHPExcel_RichText_TextElement
  • PHPExcel_Settings
  • PHPExcel_Shared_CodePage
  • PHPExcel_Shared_Date
  • PHPExcel_Shared_Drawing
  • PHPExcel_Shared_Escher
  • PHPExcel_Shared_Escher_DgContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer
  • PHPExcel_Shared_Escher_DggContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip
  • PHPExcel_Shared_Excel5
  • PHPExcel_Shared_File
  • PHPExcel_Shared_Font
  • PHPExcel_Shared_JAMA_LUDecomposition
  • PHPExcel_Shared_JAMA_Matrix
  • PHPExcel_Shared_JAMA_QRDecomposition
  • PHPExcel_Shared_OLE
  • PHPExcel_Shared_OLE_ChainedBlockStream
  • PHPExcel_Shared_OLE_PPS
  • PHPExcel_Shared_OLE_PPS_File
  • PHPExcel_Shared_OLE_PPS_Root
  • PHPExcel_Shared_OLERead
  • PHPExcel_Shared_PasswordHasher
  • PHPExcel_Shared_String
  • PHPExcel_Shared_TimeZone
  • PHPExcel_Shared_XMLWriter
  • PHPExcel_Shared_ZipArchive
  • PHPExcel_Shared_ZipStreamWrapper
  • PHPExcel_Style
  • PHPExcel_Style_Alignment
  • PHPExcel_Style_Border
  • PHPExcel_Style_Borders
  • PHPExcel_Style_Color
  • PHPExcel_Style_Conditional
  • PHPExcel_Style_Fill
  • PHPExcel_Style_Font
  • PHPExcel_Style_NumberFormat
  • PHPExcel_Style_Protection
  • PHPExcel_Style_Supervisor
  • PHPExcel_Worksheet
  • PHPExcel_Worksheet_AutoFilter
  • PHPExcel_Worksheet_AutoFilter_Column
  • PHPExcel_Worksheet_AutoFilter_Column_Rule
  • PHPExcel_Worksheet_BaseDrawing
  • PHPExcel_Worksheet_CellIterator
  • PHPExcel_Worksheet_ColumnDimension
  • PHPExcel_Worksheet_Drawing
  • PHPExcel_Worksheet_Drawing_Shadow
  • PHPExcel_Worksheet_HeaderFooter
  • PHPExcel_Worksheet_HeaderFooterDrawing
  • PHPExcel_Worksheet_MemoryDrawing
  • PHPExcel_Worksheet_PageMargins
  • PHPExcel_Worksheet_PageSetup
  • PHPExcel_Worksheet_Protection
  • PHPExcel_Worksheet_Row
  • PHPExcel_Worksheet_RowDimension
  • PHPExcel_Worksheet_RowIterator
  • PHPExcel_Worksheet_SheetView
  • PHPExcel_WorksheetIterator
  • PHPExcel_Writer_Abstract
  • PHPExcel_Writer_CSV
  • PHPExcel_Writer_Excel2007
  • PHPExcel_Writer_Excel2007_Chart
  • PHPExcel_Writer_Excel2007_Comments
  • PHPExcel_Writer_Excel2007_ContentTypes
  • PHPExcel_Writer_Excel2007_DocProps
  • PHPExcel_Writer_Excel2007_Drawing
  • PHPExcel_Writer_Excel2007_Rels
  • PHPExcel_Writer_Excel2007_RelsRibbon
  • PHPExcel_Writer_Excel2007_RelsVBA
  • PHPExcel_Writer_Excel2007_StringTable
  • PHPExcel_Writer_Excel2007_Style
  • PHPExcel_Writer_Excel2007_Theme
  • PHPExcel_Writer_Excel2007_Workbook
  • PHPExcel_Writer_Excel2007_Worksheet
  • PHPExcel_Writer_Excel2007_WriterPart
  • PHPExcel_Writer_Excel5
  • PHPExcel_Writer_Excel5_BIFFwriter
  • PHPExcel_Writer_Excel5_Escher
  • PHPExcel_Writer_Excel5_Font
  • PHPExcel_Writer_Excel5_Parser
  • PHPExcel_Writer_Excel5_Workbook
  • PHPExcel_Writer_Excel5_Worksheet
  • PHPExcel_Writer_Excel5_Xf
  • PHPExcel_Writer_HTML
  • PHPExcel_Writer_PDF
  • PHPExcel_Writer_PDF_Core
  • PHPExcel_Writer_PDF_DomPDF
  • PHPExcel_Writer_PDF_mPDF
  • PHPExcel_Writer_PDF_tcPDF
  • Provincia
  • Radiacion
  • SingularValueDecomposition
  • Sistema
  • trendClass
  • xajax
  • xajaxArgumentManager
  • xajaxCallableObject
  • xajaxCallableObjectPlugin
  • xajaxControl
  • xajaxControlContainer
  • xajaxCustomRequest
  • xajaxCustomResponse
  • xajaxEvent
  • xajaxEventPlugin
  • xajaxFunctionPlugin
  • xajaxIncludeClientScriptPlugin
  • xajaxLanguageManager
  • xajaxPlugin
  • xajaxPluginManager
  • xajaxRequest
  • xajaxRequestPlugin
  • xajaxResponse
  • xajaxResponseManager
  • xajaxResponsePlugin
  • xajaxScriptPlugin
  • xajaxUserFunction
  • XMLWriter

Interfaces

  • DateTimeInterface
  • Iterator
  • PHPExcel_CachedObjectStorage_ICache
  • PHPExcel_Cell_IValueBinder
  • PHPExcel_IComparable
  • PHPExcel_Reader_IReader
  • PHPExcel_Reader_IReadFilter
  • PHPExcel_RichText_ITextElement
  • PHPExcel_Writer_IWriter
  • Throwable
  • Traversable

Exceptions

  • Exception
  • PHPExcel_Calculation_Exception
  • PHPExcel_Chart_Exception
  • PHPExcel_Exception
  • PHPExcel_Reader_Exception
  • PHPExcel_Writer_Exception

Functions

  • acosh
  • agregar_elemento
  • asinh
  • atanh
  • borrar_elementos
  • borrar_gdm_ab
  • borrar_irradiacion
  • borrar_latitud
  • borrar_panel
  • borrar_periodo
  • borrar_pmp_min_pmp_max
  • borrar_radiacion
  • borrar_resumen
  • borrar_sistema
  • borrar_sombra
  • gdm_ab
  • grabar_resumen
  • historial
  • hypo
  • irradiacion
  • JAMAError
  • latitud
  • limpiar_historial
  • login
  • mb_str_replace
  • mostrar_energia_total_ch
  • mostrar_panel_md_th
  • mostrar_panel_th
  • mostrar_radiacion_md_th
  • mostrar_radiacion_th
  • mostrar_resumen_th
  • panel
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • periodo
  • pmp_min_pmp_max
  • preparar_panel
  • preparar_radiacion
  • preparar_radiacion_media
  • radiacion
  • resumen
  • sistema
  • sombra
  • xajaxCompressFile
  • xajaxErrorHandler
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * PHPExcel
  4:  *
  5:  * Copyright (c) 2006 - 2014 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 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 24:  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
 25:  * @version    1.8.0, 2014-03-02
 26:  */
 27: 
 28: 
 29: /**
 30:  * PHPExcel_CachedObjectStorage_APC
 31:  *
 32:  * @category   PHPExcel
 33:  * @package    PHPExcel_CachedObjectStorage
 34:  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 35:  */
 36: class PHPExcel_CachedObjectStorage_APC extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {
 37: 
 38:     /**
 39:      * Prefix used to uniquely identify cache data for this worksheet
 40:      *
 41:      * @access    private
 42:      * @var string
 43:      */
 44:     private $_cachePrefix = null;
 45: 
 46:     /**
 47:      * Cache timeout
 48:      *
 49:      * @access    private
 50:      * @var integer
 51:      */
 52:     private $_cacheTime = 600;
 53: 
 54: 
 55:     /**
 56:      * Store cell data in cache for the current cell object if it's "dirty",
 57:      *     and the 'nullify' the current cell object
 58:      *
 59:      * @access  private
 60:      * @return  void
 61:      * @throws  PHPExcel_Exception
 62:      */
 63:     protected function _storeData() {
 64:         if ($this->_currentCellIsDirty && !empty($this->_currentObjectID)) {
 65:             $this->_currentObject->detach();
 66: 
 67:             if (!apc_store($this->_cachePrefix.$this->_currentObjectID.'.cache',serialize($this->_currentObject),$this->_cacheTime)) {
 68:                 $this->__destruct();
 69:                 throw new PHPExcel_Exception('Failed to store cell '.$this->_currentObjectID.' in APC');
 70:             }
 71:             $this->_currentCellIsDirty = false;
 72:         }
 73:         $this->_currentObjectID = $this->_currentObject = null;
 74:     }    //    function _storeData()
 75: 
 76: 
 77:     /**
 78:      * Add or Update a cell in cache identified by coordinate address
 79:      *
 80:      * @access  public
 81:      * @param   string         $pCoord  Coordinate address of the cell to update
 82:      * @param   PHPExcel_Cell  $cell    Cell to update
 83:      * @return  void
 84:      * @throws  PHPExcel_Exception
 85:      */
 86:     public function addCacheData($pCoord, PHPExcel_Cell $cell) {
 87:         if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
 88:             $this->_storeData();
 89:         }
 90:         $this->_cellCache[$pCoord] = true;
 91: 
 92:         $this->_currentObjectID = $pCoord;
 93:         $this->_currentObject = $cell;
 94:         $this->_currentCellIsDirty = true;
 95: 
 96:         return $cell;
 97:     }    //    function addCacheData()
 98: 
 99: 
100:     /**
101:      * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell?
102:      *
103:      * @access  public
104:      * @param   string  $pCoord  Coordinate address of the cell to check
105:      * @return  void
106:      * @return  boolean
107:      */
108:     public function isDataSet($pCoord) {
109:         //    Check if the requested entry is the current object, or exists in the cache
110:         if (parent::isDataSet($pCoord)) {
111:             if ($this->_currentObjectID == $pCoord) {
112:                 return true;
113:             }
114:             //    Check if the requested entry still exists in apc
115:             $success = apc_fetch($this->_cachePrefix.$pCoord.'.cache');
116:             if ($success === FALSE) {
117:                 //    Entry no longer exists in APC, so clear it from the cache array
118:                 parent::deleteCacheData($pCoord);
119:                 throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
120:             }
121:             return true;
122:         }
123:         return false;
124:     }    //    function isDataSet()
125: 
126: 
127:     /**
128:      * Get cell at a specific coordinate
129:      *
130:      * @access  public
131:      * @param   string         $pCoord  Coordinate of the cell
132:      * @throws  PHPExcel_Exception
133:      * @return  PHPExcel_Cell  Cell that was found, or null if not found
134:      */
135:     public function getCacheData($pCoord) {
136:         if ($pCoord === $this->_currentObjectID) {
137:             return $this->_currentObject;
138:         }
139:         $this->_storeData();
140: 
141:         //    Check if the entry that has been requested actually exists
142:         if (parent::isDataSet($pCoord)) {
143:             $obj = apc_fetch($this->_cachePrefix.$pCoord.'.cache');
144:             if ($obj === FALSE) {
145:                 //    Entry no longer exists in APC, so clear it from the cache array
146:                 parent::deleteCacheData($pCoord);
147:                 throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
148:             }
149:         } else {
150:             //    Return null if requested entry doesn't exist in cache
151:             return null;
152:         }
153: 
154:         //    Set current entry to the requested entry
155:         $this->_currentObjectID = $pCoord;
156:         $this->_currentObject = unserialize($obj);
157:         //    Re-attach this as the cell's parent
158:         $this->_currentObject->attach($this);
159: 
160:         //    Return requested entry
161:         return $this->_currentObject;
162:     }    //    function getCacheData()
163: 
164: 
165:     /**
166:      * Get a list of all cell addresses currently held in cache
167:      *
168:      * @return  array of string
169:      */
170:     public function getCellList() {
171:         if ($this->_currentObjectID !== null) {
172:             $this->_storeData();
173:         }
174: 
175:         return parent::getCellList();
176:     }
177: 
178: 
179:     /**
180:      * Delete a cell in cache identified by coordinate address
181:      *
182:      * @access  public
183:      * @param   string  $pCoord  Coordinate address of the cell to delete
184:      * @throws  PHPExcel_Exception
185:      */
186:     public function deleteCacheData($pCoord) {
187:         //    Delete the entry from APC
188:         apc_delete($this->_cachePrefix.$pCoord.'.cache');
189: 
190:         //    Delete the entry from our cell address array
191:         parent::deleteCacheData($pCoord);
192:     }    //    function deleteCacheData()
193: 
194: 
195:     /**
196:      * Clone the cell collection
197:      *
198:      * @access  public
199:      * @param   PHPExcel_Worksheet  $parent  The new worksheet
200:      * @throws  PHPExcel_Exception
201:      * @return  void
202:      */
203:     public function copyCellCollection(PHPExcel_Worksheet $parent) {
204:         parent::copyCellCollection($parent);
205:         //    Get a new id for the new file name
206:         $baseUnique = $this->_getUniqueID();
207:         $newCachePrefix = substr(md5($baseUnique),0,8).'.';
208:         $cacheList = $this->getCellList();
209:         foreach($cacheList as $cellID) {
210:             if ($cellID != $this->_currentObjectID) {
211:                 $obj = apc_fetch($this->_cachePrefix.$cellID.'.cache');
212:                 if ($obj === FALSE) {
213:                     //    Entry no longer exists in APC, so clear it from the cache array
214:                     parent::deleteCacheData($cellID);
215:                     throw new PHPExcel_Exception('Cell entry '.$cellID.' no longer exists in APC');
216:                 }
217:                 if (!apc_store($newCachePrefix.$cellID.'.cache',$obj,$this->_cacheTime)) {
218:                     $this->__destruct();
219:                     throw new PHPExcel_Exception('Failed to store cell '.$cellID.' in APC');
220:                 }
221:             }
222:         }
223:         $this->_cachePrefix = $newCachePrefix;
224:     }    //    function copyCellCollection()
225: 
226: 
227:     /**
228:      * Clear the cell collection and disconnect from our parent
229:      *
230:      * @return  void
231:      */
232:     public function unsetWorksheetCells() {
233:         if ($this->_currentObject !== NULL) {
234:             $this->_currentObject->detach();
235:             $this->_currentObject = $this->_currentObjectID = null;
236:         }
237: 
238:         //    Flush the APC cache
239:         $this->__destruct();
240: 
241:         $this->_cellCache = array();
242: 
243:         //    detach ourself from the worksheet, so that it can then delete this object successfully
244:         $this->_parent = null;
245:     }    //    function unsetWorksheetCells()
246: 
247: 
248:     /**
249:      * Initialise this new cell collection
250:      *
251:      * @param  PHPExcel_Worksheet  $parent     The worksheet for this cell collection
252:      * @param  array of mixed      $arguments  Additional initialisation arguments
253:      */
254:     public function __construct(PHPExcel_Worksheet $parent, $arguments) {
255:         $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600;
256: 
257:         if ($this->_cachePrefix === NULL) {
258:             $baseUnique = $this->_getUniqueID();
259:             $this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
260:             $this->_cacheTime = $cacheTime;
261: 
262:             parent::__construct($parent);
263:         }
264:     }    //    function __construct()
265: 
266: 
267:     /**
268:      * Destroy this cell collection
269:      */
270:     public function __destruct() {
271:         $cacheList = $this->getCellList();
272:         foreach($cacheList as $cellID) {
273:             apc_delete($this->_cachePrefix.$cellID.'.cache');
274:         }
275:     }    //    function __destruct()
276: 
277: 
278:     /**
279:      * Identify whether the caching method is currently available
280:      * Some methods are dependent on the availability of certain extensions being enabled in the PHP build
281:      *
282:      * @return  boolean
283:      */
284:     public static function cacheMethodIsAvailable() {
285:         if (!function_exists('apc_store')) {
286:             return FALSE;
287:         }
288:         if (apc_sma_info() === FALSE) {
289:             return FALSE;
290:         }
291: 
292:         return TRUE;
293:     }
294: 
295: }
296: 
Autene API documentation generated by ApiGen