@param int  $id
@param int  $offset
@param bool $cleanup Be carefully! If not clean up memory automatic, you must delete this by yourself

@return bool|int|mixed|string
551653
public function read(int $id, int &$offset = 0, bool $cleanup = true)
    {
        $this->logger->beginProfile('read_' . $id);
        $key    = $this->getSharedItemKey($id);
        $sh     = shmop_open($key, 'a', 0, 0);
        $header = shmop_read($sh, 0, self::HEADER_SIZE);
        list($id, $off, $size, $flags) = $this->unpackHeader($header);
        $this->logger->debug(sprintf('Reading state: (key = 0x%08x, shmid = %d)', $key, $sh));
        $this->logger->debug(sprintf("State header: (id = %d, offset = %d, size = 0x%08x, flags = 0x%03x)", $id,
            $offset,
            $size, $flags));

        $result = shmop_read($sh, self::HEADER_SIZE, $size);
        $this->logger->debug(sprintf('State data: (size = 0x%08x)', mb_strlen($result, 'utf-8')));
        if ($cleanup) {
            shmop_delete($sh);
        }

        shmop_close($sh);

        $result = $this->getResult($result, $flags);
        $offset = $off;

        $this->logger->endProfile('read_' . $id, "Reading {$id} data");

        return $result;
    }
445953
public static function get($ID = 'latest', $offset = 0)
    {
        if ($ID === 'latest') {
            if ($offset > 0) {
                $offset = $offset*-1;
            }
            if (Config::get('store') == 'global') {
                $k = array_splice(@array_keys(self::$_tagStore), -1+$offset, 1);
                return self::$_tagStore[$k[0]];
            } elseif (Config::get('store') == 'internal') {
                $Store = Config::getHTMLInstance()->tagStore;
                $k = array_splice(@array_keys($Store), -1+$offset, 1);
                return $Store[$k[0]];
            }
        } elseif (is_int($ID)) {
            if (Config::get('store') == 'global' && isset(self::$_tagStore[$ID])) {
                return self::$_tagStore[$ID];
            } elseif (Config::get('store') == 'internal'
                && isset(Config::getHTMLInstance()->tagStore[$ID])
            ) {
                return Config::getHTMLInstance()->tagStore[$ID];
            }
        }

        return false;
    }
978086
public function deleteRelease(string $id): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases/:id',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_DELETE);

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
1119743
public function delete($id)
    {
        $this->collect('delete', $id);

        $this->stopWatch->start('cache');
        $result = $this->cache->delete($id);
        $this->stopWatch->stop('cache');

        return $result;
    }
245251
public function findCacheById(int $id)
    {

        // Check if already in addToCache
        if ($this->isCachedById($id)) {
            return $this->cacheById[$id];
        }

        return null;
    }
393184
public function rawDeleteById($id)
        {
            if (!$id) {
                return null;
            }

            $query = new Query($this);
            $query->where($this->id_column, $id);
            $query->generateDeleteSQL();

            $this->deleteB2DBObjectFromCache($id);

            return Statement::getPreparedStatement($query)->execute();
        }
451088
public function delete($id)
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		$request = $this->getRequest();
		$content = $request->getContent();
		$content = !empty($content) ? Json::decode($content, Json::TYPE_ARRAY) : array();
		$post = array_merge_recursive(
			$request->getPost()->toArray(),
			$content
		);
		$classifiedService = $this->getServiceLocator()->get('document.service.classified');

		$returnData = '';
		$action = strtolower($id);
		$classifiedService = $this->getServiceLocator()->get('document.service.classified');
		
		switch($action) {
			case 'bulk':
				$ids = $this->params()->fromQuery('ids', array());
				$ids = !is_array($ids) ? explode(",", $ids) : $ids;
				$success = 0;
				$error = 0;
				foreach($ids as $id) {
					try {
						$classifiedService->delete($id);		
						$success++;
					} catch(\Exception $e) {
						$error++;
					};
				}
						
				$returnData = array(
					'status' => 'success',
					'message' => 'Annunci eliminati con successo (' . $success . '/' . $error . ')'
				);
				break;
			default:
				try {
					$classifiedService->delete($id);
					$returnData = array(
						'status' => 'success',
						'message' => 'Annuncio eliminato con successo'
					);
				} catch(\Exception $e) {
					$this->getResponse()
					->setStatusCode(Response::STATUS_CODE_500);
					$returnData = array(
						'status' => 'danger',
						'message' => $e->getMessage()
					);
				}
				break;
		}

		return new JsonModel($returnData);
	}
1163602
private function processCache($id,$attributes,$offset)
	{
		return $this->processBeginCache($id,$attributes,$offset) . $this->processEndCache($id,$offset);
	}
1254709
public function reduce($field, $offset, $id)
    {
        $this->sqlBuilder->addWhere($this->primaryKey, $id);
        return $this->batchReduce($field, $offset);
    }
1291838
public function fetch($id)
    {
        if (empty($id)) {
            return false;
        }

        if (array_key_exists($id, self::$staticCache)) {
            return self::$staticCache[$id];
        }

        if (!$this->cache->contains($id)) {
            return false;
        }

        return $this->cache->fetch($id);
    }
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
156261
public function del($id)
    {
        $filePath = $this->getPath($id);

        // invalidate opcache first, fails on already deleted file
        if (function_exists('opcache_invalidate')) {
            opcache_invalidate($filePath, true);
        }

        $success = @unlink($filePath);
        return $success;
    }
1257743
public function destroy($id)
    {
        $delete = $this->repo->delete($id);

        if ( ! $delete)
        {
            return $this->respondNotProcessable('Unable to delete the selected '.ucfirst($this->baseClass));
        }

        $message = $this->baseClass.' deleted successfully';

        return compact('message');
    }
871540
public function destroy($id) {
        $key = $this->getKey($id);
        return $this->mem->remove($key);
    }
1013343
public function remove($id)
    {
        $file = $this->_file($id);
        $boolRemove   = $this->_remove($file);
        $boolMetadata = $this->_delMetadatas($id);
        return $boolMetadata && $boolRemove;
    }
261357
final public function getObjectId($offset)
    {
        if ($this->__isset($offset)) {
            return spl_object_id($this->registry[ $offset ]);
        }

        return false;
    }
239775
public function delete(string $id): bool
    {
        if (\array_key_exists($id, $this->cache)) {

            //delete value
            unset($this->cache[$id]);

            //return function result
            return true;
        }

        return false;
    }