Remove HashTable item

@param	PHPExcel_IComparable $pSource	Item to remove
@throws	PHPExcel_Exception
383
public function remove(PHPExcel_IComparable $pSource = null) {
		$hash = $pSource->getHashCode();
		if (isset($this->_items[$hash])) {
			unset($this->_items[$hash]);

			$deleteKey = -1;
			foreach ($this->_keyMap as $key => $value) {
				if ($deleteKey >= 0) {
					$this->_keyMap[$key - 1] = $value;
				}

				if ($value == $hash) {
					$deleteKey = $key;
				}
			}
			unset($this->_keyMap[count($this->_keyMap) - 1]);
		}
	}
602730
public function removeDataSource($interfaceName, $driver, $className)
    {
        if (!isset($this->dataSources[$interfaceName][$driver])) {
            return false;
        }
        
        unset($this->dataSources[$interfaceName][$driver]);
        $this->saveDataSources();
        
        return true;
    }
918437
public function isDataSet($pCoord) {
        //    Check if the requested entry is the current object, or exists in the cache
        if (parent::isDataSet($pCoord)) {
            if ($this->_currentObjectID == $pCoord) {
                return true;
            }
            //    Check if the requested entry still exists in apc
            $success = apc_fetch($this->_cachePrefix.$pCoord.'.cache');
            if ($success === FALSE) {
                //    Entry no longer exists in APC, so clear it from the cache array
                parent::deleteCacheData($pCoord);
                throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
            }
            return true;
        }
        return false;
    }
1264119
public function isDataSet($pCoord)
    {
        //    Check if the requested entry is the current object, or exists in the cache
        if (parent::isDataSet($pCoord)) {
            if ($this->currentObjectID == $pCoord) {
                return true;
            }
            //    Check if the requested entry still exists in apc
            $success = apc_fetch($this->cachePrefix.$pCoord.'.cache');
            if ($success === false) {
                //    Entry no longer exists in APC, so clear it from the cache array
                parent::deleteCacheData($pCoord);
                throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache');
            }
            return true;
        }
        return false;
    }
59760
public function deleteCacheData($pCoord) {
		if ($pCoord === $this->_currentObjectID) {
			$this->_currentObject->detach();
			$this->_currentObjectID = $this->_currentObject = null;
		}

		//	Check if the requested entry exists in the cache
		$query = "DELETE FROM kvp_".$this->_TableName." WHERE id='".$pCoord."'";
		if (!$this->_DBHandle->queryExec($query))
			throw new PHPExcel_Exception(sqlite_error_string($this->_DBHandle->lastError()));

		$this->_currentCellIsDirty = false;
	}
465377
public function remove($fromSource, $paths): bool
    {
        $paths = (array)$paths;
        $fromSource = $this->cleanSource($fromSource);
        list($alias) = $this->parse($fromSource);

        $return = false;

        foreach ($paths as $origPath) {
            $path = $this->cleanPathInternal($this->cleanPath($origPath));

            $key = array_search($path, $this->paths[$alias], true);
            if (false !== $key) {
                unset($this->paths[$alias][$key]);
                $return = true;
            }
        }

        return $return;
    }
531913
public function remove($key){

        if($this->secure){
            throw new Exception("You can't remove items from secure instance of container ($this->name)");
        }

        if( !$this->exists($key) ){
            throw new Exception("Item does not exist in storage ($key)");
        }
        unset($this->storage[$key]);    

    }
511194
private static function removeResourceFromRequestContext(IPoolResource $resource)
    {
        $poolResources = RequestContext::get('poolResources', []);
        $instance = $resource->getInstance();
        $key = spl_object_hash($instance);
        if(isset($poolResources[$key]))
        {
            unset($poolResources[$key]);
            RequestContext::set('poolResources', $poolResources);
        }

        $name = 'poolResource.' . $resource->getPool()->getName();
        $poolResource = RequestContext::get($name);
        if($poolResource === $resource)
        {
            RequestContext::set($name, null);
        }
    }
1065296
public function removeItem(string $key) : void
    {
        $this->checkCallback();
        if (isset($this->members[$key])) {
            unset($this->members[$key]);
        } else {
            throw new CollectionException('Unable to remove from collection - key ' . $key . ' not found.');
        }
    }
1239142
public function remove(TypeInterface $typeToRemove)
    {
        foreach ($this->collection as $key => $type) {
            if ($type === $typeToRemove) {
                unset($this->collection[$key]);

                return;
            }
        }

        throw new \RuntimeException(\sprintf('Cannot remove given type %s', \var_export($typeToRemove, true)));
    }
875019
public function unsetWorksheetCells() {
        if ($this->_currentObject !== NULL) {
            $this->_currentObject->detach();
            $this->_currentObject = $this->_currentObjectID = null;
        }

        //    Flush the APC cache
        $this->__destruct();

        $this->_cellCache = array();

        //    detach ourself from the worksheet, so that it can then delete this object successfully
        $this->_parent = null;
    }
306832
public void removeTable(final Table table) {
        final List<Column> columns = table.getColumns();
        for (final Column column : columns) {
            _analysisJobBuilder.removeSourceColumn(column);
        }
    }
1170345
public function cleanReferencedResultsCache($table = null, $viaColumn = null)
    {
        if ($table === null or $viaColumn === null) {
            $this->referenced = [];
        } else {
            foreach ($this->referenced as $key => $value) {
                if (preg_match("~^$table\\($viaColumn\\)(#.*)?$~", $key)) {
                    unset($this->referenced[$key]);
                }
            }
        }
    }
196203
public function onDelete(DeleteResourceEvent $event)
    {
        $ds = DIRECTORY_SEPARATOR;
        $scorm = $event->getResource();
        $workspace = $scorm->getResourceNode()->getWorkspace();
        $hashName = $scorm->getHashName();

        $nbScorm = (int) ($this->scormResourceRepo->findNbScormWithSameSource($hashName, $workspace));

        if (1 === $nbScorm) {
            $scormArchiveFile = $this->filesDir.$ds.'scorm'.$ds.$workspace->getUuid().$ds.$hashName;
            $scormResourcesPath = $this->uploadDir.$ds.'scorm'.$ds.$workspace->getUuid().$ds.$hashName;

            if (file_exists($scormArchiveFile)) {
                $event->setFiles([$scormArchiveFile]);
            }
            if (file_exists($scormResourcesPath)) {
                try {
                    $this->deleteFiles($scormResourcesPath);
                } catch (\Exception $e) {
                }
            }
        }
        $this->om->remove($event->getResource());
        $event->stopPropagation();
    }
1344845
public function copyCellCollection(PHPExcel_Worksheet $parent) {
		parent::copyCellCollection($parent);
		//	Open a new stream for the cell cache data
		$newFileHandle = fopen('php://temp/maxmemory:'.$this->_memoryCacheSize,'a+');
		//	Copy the existing cell cache data to the new stream
		fseek($this->_fileHandle,0);
		while (!feof($this->_fileHandle)) {
			fwrite($newFileHandle,fread($this->_fileHandle, 1024));
		}
		$this->_fileHandle = $newFileHandle;
	}
92703
public function deleteRule(EventInterface $event) {
        $acl = $event->getAccessControl();

        if (!($acl instanceof MutableAdapterInterface)) {
            throw new ResourceException('Access control adapter is immutable', 405);
        }

        $request = $event->getRequest();
        $publicKey = $request->getRoute()->get('publickey');
        $accessRuleId = $request->getRoute()->get('accessRuleId');

        $keyExists = $acl->publicKeyExists($publicKey);

        if (!$keyExists) {
            throw new RuntimeException('Public key not found', 404);
        }

        $accessRule = $acl->getAccessRule($publicKey, $accessRuleId);

        if (!$accessRule) {
            throw new RuntimeException('Access rule not found', 404);
        }

        $acl->deleteAccessRule($publicKey, $accessRuleId);
    }
806449
public function write(PHPExcel $pPHPExcel = null)
    {
        if (!$pPHPExcel) {
            $pPHPExcel = $this->getParentWriter()->getPHPExcel();
        }

        $objWriter = null;
        if ($this->getParentWriter()->getUseDiskCaching()) {
            $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
        } else {
            $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
        }

        // XML header
        $objWriter->startDocument('1.0', 'UTF-8');

        // Meta
        $objWriter->startElement('office:document-meta');

        $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
        $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
        $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');
        $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0');
        $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');
        $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#');
        $objWriter->writeAttribute('office:version', '1.2');

        $objWriter->startElement('office:meta');

        $objWriter->writeElement('meta:initial-creator', $pPHPExcel->getProperties()->getCreator());
        $objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator());
        $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated()));
        $objWriter->writeElement('dc:date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated()));
        $objWriter->writeElement('dc:title', $pPHPExcel->getProperties()->getTitle());
        $objWriter->writeElement('dc:description', $pPHPExcel->getProperties()->getDescription());
        $objWriter->writeElement('dc:subject', $pPHPExcel->getProperties()->getSubject());
        $keywords = explode(' ', $pPHPExcel->getProperties()->getKeywords());
        foreach ($keywords as $keyword) {
            $objWriter->writeElement('meta:keyword', $keyword);
        }

        //<meta:document-statistic meta:table-count="XXX" meta:cell-count="XXX" meta:object-count="XXX"/>
        $objWriter->startElement('meta:user-defined');
        $objWriter->writeAttribute('meta:name', 'Company');
        $objWriter->writeRaw($pPHPExcel->getProperties()->getCompany());
        $objWriter->endElement();
 
        $objWriter->startElement('meta:user-defined');
        $objWriter->writeAttribute('meta:name', 'category');
        $objWriter->writeRaw($pPHPExcel->getProperties()->getCategory());
        $objWriter->endElement();

        $objWriter->endElement();

        $objWriter->endElement();

        return $objWriter->getData();
    }