43 $this->_currentObject->detach();
45 fseek($this->_fileHandle,0,SEEK_END);
46 $offset = ftell($this->_fileHandle);
47 fwrite($this->_fileHandle, serialize($this->_currentObject));
49 'sz' => ftell($this->_fileHandle) - $offset
51 $this->_currentObjectID = $this->_currentObject = null;
64 if (($pCoord !== $this->_currentObjectID) && ($this->_currentObjectID !== null)) {
68 $this->_currentObjectID = $pCoord;
69 $this->_currentObject = $cell;
83 if ($pCoord === $this->_currentObjectID) {
89 if (!isset($this->_cellCache[$pCoord])) {
95 $this->_currentObjectID = $pCoord;
96 fseek($this->_fileHandle,$this->_cellCache[$pCoord][
'ptr']);
97 $this->_currentObject = unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord][
'sz']));
99 $this->_currentObject->attach($this->_parent);
117 copy ($this->_fileName,$newFileName);
118 $this->_fileName = $newFileName;
120 $this->_fileHandle = fopen($this->_fileName,
'a+');
125 if(!is_null($this->_currentObject)) {
126 $this->_currentObject->detach();
127 $this->_currentObject = $this->_currentObjectID = null;
129 $this->_cellCache = array();
132 $this->_parent = null;
141 if (is_null($this->_fileHandle)) {
144 $this->_fileHandle = fopen($this->_fileName,
'a+');
150 if (!is_null($this->_fileHandle)) {
151 fclose($this->_fileHandle);
152 unlink($this->_fileName);
154 $this->_fileHandle = null;